1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-27 12:16:22 +03:00

Context: return DynamicSelectionLists in jump_{forward,backward}

This commit is contained in:
Maxime Coste 2013-05-27 19:23:59 +02:00
parent 9630990b74
commit 6cb8d69d29
3 changed files with 5 additions and 5 deletions

View File

@ -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())
{

View File

@ -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; }

View File

@ -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())
{