diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-03-30 23:56:33 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-03-30 23:56:33 +0100 |
| commit | 519254dfdc9fe86f4563eb7f1cb130baba4dd9a9 (patch) | |
| tree | 568eb322773b716b8608b314b88bc772a0548148 /src/client.cc | |
| parent | 335c73a09b038e80faa6e61906041e7392c15532 (diff) | |
More useage of the format function
Diffstat (limited to 'src/client.cc')
| -rw-r--r-- | src/client.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client.cc b/src/client.cc index dcd575b8..27a56c80 100644 --- a/src/client.cc +++ b/src/client.cc @@ -104,11 +104,11 @@ DisplayLine Client::generate_mode_line() const Face status_face = get_face("StatusLine"); status.push_back({ context().buffer().display_name(), status_face }); - status.push_back({ " " + to_string((int)pos.line+1) + ":" + to_string((int)col+1) + " ", status_face }); + status.push_back({ format(" {}:{} ", pos.line+1, col+1), status_face }); if (context().buffer().is_modified()) status.push_back({ "[+]", info_face }); if (m_input_handler.is_recording()) - status.push_back({ "[recording ("_str + StringView{m_input_handler.recording_reg()} + ")]", info_face }); + status.push_back({ format("[recording ({})]", m_input_handler.recording_reg()), info_face }); if (context().buffer().flags() & Buffer::Flags::New) status.push_back({ "[new file]", info_face }); if (context().user_hooks_support().is_disabled()) @@ -118,7 +118,7 @@ DisplayLine Client::generate_mode_line() const status.push_back({ " ", status_face }); for (auto& atom : m_input_handler.mode_line()) status.push_back(std::move(atom)); - status.push_back({ " - " + context().name() + "@[" + Server::instance().session() + "]", status_face }); + status.push_back({ format(" - {}@[{}]", context().name(), Server::instance().session()), status_face }); return status; } |
