diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-12-15 14:25:23 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-12-15 14:25:23 +0000 |
| commit | 935bc3cec9707dcf95d978baa2bd323e22420b02 (patch) | |
| tree | 231379350ff83ff31d783dfc786ed7c951603529 /src/client.cc | |
| parent | 9b6639eb2754a72d5f6ae35055b750da10b262c1 (diff) | |
Add Context::selections method, and use it in priority to the Editor's one
Diffstat (limited to 'src/client.cc')
| -rw-r--r-- | src/client.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client.cc b/src/client.cc index c9788951..c9599403 100644 --- a/src/client.cc +++ b/src/client.cc @@ -41,7 +41,7 @@ void Client::print_status(DisplayLine status_line) DisplayLine Client::generate_mode_line() const { - auto pos = context().editor().selections().main().last(); + auto pos = context().selections().main().last(); auto col = context().buffer()[pos.line].char_count_to(pos.column); std::ostringstream oss; @@ -76,7 +76,7 @@ void Client::redraw_ifn() static void reload_buffer(Context& context, const String& filename) { DisplayCoord view_pos = context.window().position(); - BufferCoord cursor_pos = context.editor().selections().main().last(); + BufferCoord cursor_pos = context.selections().main().last(); Buffer* buf = create_buffer_from_file(filename); if (not buf) return; |
