From 9a361e2657ca908adc7580073ddf21961f1be967 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 18 Apr 2013 14:28:35 +0200 Subject: [PATCH] Tweak status line --- src/client_manager.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/client_manager.cc b/src/client_manager.cc index 72063db5..64c406aa 100644 --- a/src/client_manager.cc +++ b/src/client_manager.cc @@ -183,14 +183,15 @@ Client& ClientManager::get_client(const String& name) throw runtime_error("no client named: " + name); } -static DisplayLine generate_status_line(const Context& context) +static DisplayLine generate_status_line(Client& client) { + auto& context = client.context(); auto pos = context.editor().main_selection().last(); auto col = utf8::distance(context.buffer().iterator_at_line_begin(pos), pos); std::ostringstream oss; oss << context.buffer().display_name() - << " " << (int)pos.line()+1 << "," << (int)col+1; + << " " << (int)pos.line()+1 << ":" << (int)col+1; if (context.buffer().is_modified()) oss << " [+]"; if (context.input_handler().is_recording()) @@ -200,6 +201,7 @@ static DisplayLine generate_status_line(const Context& context) oss << " [" << context.editor().selections().size() << " sel]"; if (context.editor().is_editing()) oss << " [insert]"; + oss << " - " << client.name(); return { oss.str(), get_color("StatusLine") }; } @@ -217,7 +219,7 @@ void ClientManager::redraw_clients() const context.window().update_display_buffer();; context.ui().draw(context.window().display_buffer(), - generate_status_line(context)); + generate_status_line(*client)); } } }