diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-05-27 19:23:59 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-05-29 18:56:14 +0200 |
| commit | 6cb8d69d29c77c01d92f8adb63e574f7f8d512a4 (patch) | |
| tree | 856838456a3812b1ae1a31692f5988a94951053b | |
| parent | 9630990b748cacdf8721874b30cb36e086ea34a6 (diff) | |
Context: return DynamicSelectionLists in jump_{forward,backward}
| -rw-r--r-- | src/context.cc | 4 | ||||
| -rw-r--r-- | src/context.hh | 4 | ||||
| -rw-r--r-- | src/normal.cc | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/context.cc b/src/context.cc index 30c56e20..ed01e1c6 100644 --- a/src/context.cc +++ b/src/context.cc @@ -98,7 +98,7 @@ void Context::push_jump() m_current_jump = m_jump_list.end(); } -const SelectionList& Context::jump_forward() +const DynamicSelectionList& Context::jump_forward() { if (m_current_jump != m_jump_list.end() and m_current_jump + 1 != m_jump_list.end()) @@ -106,7 +106,7 @@ const SelectionList& Context::jump_forward() throw runtime_error("no next jump"); } -const SelectionList& Context::jump_backward() +const DynamicSelectionList& Context::jump_backward() { if (m_current_jump != m_jump_list.begin()) { diff --git a/src/context.hh b/src/context.hh index 1217df3a..3332392e 100644 --- a/src/context.hh +++ b/src/context.hh @@ -52,8 +52,8 @@ struct Context void print_status(const DisplayLine& status) const; void push_jump(); - const SelectionList& jump_forward(); - const SelectionList& jump_backward(); + const DynamicSelectionList& jump_forward(); + const DynamicSelectionList& jump_backward(); void forget_jumps_to_buffer(Buffer& buffer); int& numeric_param() { return m_numeric_param; } diff --git a/src/normal.cc b/src/normal.cc index cb6b3b14..a3e24f50 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -691,7 +691,7 @@ void jump(Context& context) auto jump = (direction == JumpDirection::Forward) ? context.jump_forward() : context.jump_backward(); - Buffer& buffer = const_cast<Buffer&>(jump.front().buffer()); + Buffer& buffer = const_cast<Buffer&>(jump.buffer()); BufferManager::instance().set_last_used_buffer(buffer); if (&buffer != &context.buffer()) { |
