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:
parent
9630990b74
commit
6cb8d69d29
@ -98,7 +98,7 @@ void Context::push_jump()
|
|||||||
m_current_jump = m_jump_list.end();
|
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
|
if (m_current_jump != m_jump_list.end() and
|
||||||
m_current_jump + 1 != m_jump_list.end())
|
m_current_jump + 1 != m_jump_list.end())
|
||||||
@ -106,7 +106,7 @@ const SelectionList& Context::jump_forward()
|
|||||||
throw runtime_error("no next jump");
|
throw runtime_error("no next jump");
|
||||||
}
|
}
|
||||||
|
|
||||||
const SelectionList& Context::jump_backward()
|
const DynamicSelectionList& Context::jump_backward()
|
||||||
{
|
{
|
||||||
if (m_current_jump != m_jump_list.begin())
|
if (m_current_jump != m_jump_list.begin())
|
||||||
{
|
{
|
||||||
|
@ -52,8 +52,8 @@ struct Context
|
|||||||
void print_status(const DisplayLine& status) const;
|
void print_status(const DisplayLine& status) const;
|
||||||
|
|
||||||
void push_jump();
|
void push_jump();
|
||||||
const SelectionList& jump_forward();
|
const DynamicSelectionList& jump_forward();
|
||||||
const SelectionList& jump_backward();
|
const DynamicSelectionList& jump_backward();
|
||||||
void forget_jumps_to_buffer(Buffer& buffer);
|
void forget_jumps_to_buffer(Buffer& buffer);
|
||||||
|
|
||||||
int& numeric_param() { return m_numeric_param; }
|
int& numeric_param() { return m_numeric_param; }
|
||||||
|
@ -691,7 +691,7 @@ void jump(Context& context)
|
|||||||
auto jump = (direction == JumpDirection::Forward) ?
|
auto jump = (direction == JumpDirection::Forward) ?
|
||||||
context.jump_forward() : context.jump_backward();
|
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);
|
BufferManager::instance().set_last_used_buffer(buffer);
|
||||||
if (&buffer != &context.buffer())
|
if (&buffer != &context.buffer())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user