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/context.cc | |
| parent | 9b6639eb2754a72d5f6ae35055b750da10b262c1 (diff) | |
Add Context::selections method, and use it in priority to the Editor's one
Diffstat (limited to 'src/context.cc')
| -rw-r--r-- | src/context.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/context.cc b/src/context.cc index d43e85ac..35e28731 100644 --- a/src/context.cc +++ b/src/context.cc @@ -103,7 +103,7 @@ void Context::print_status(DisplayLine status) const void Context::push_jump() { - const SelectionList& jump = editor().selections(); + const SelectionList& jump = selections(); if (m_current_jump != m_jump_list.end()) { auto begin = m_current_jump; @@ -129,7 +129,7 @@ const DynamicSelectionList& Context::jump_forward() const DynamicSelectionList& Context::jump_backward() { if (m_current_jump != m_jump_list.end() and - *m_current_jump != editor().selections()) + *m_current_jump != selections()) { push_jump(); return *--m_current_jump; @@ -177,4 +177,14 @@ void Context::change_editor(Editor& editor) input_handler().reset_normal_mode(); } +SelectionList& Context::selections() +{ + return editor().selections(); +} + +const SelectionList& Context::selections() const +{ + return editor().selections(); +} + } |
