Tweak Context::push_jump implementation, simplify code
This commit is contained in:
parent
24411569fc
commit
9e664318af
|
@ -87,12 +87,7 @@ void Context::push_jump()
|
||||||
{
|
{
|
||||||
const SelectionList& jump = selections();
|
const SelectionList& jump = selections();
|
||||||
if (m_current_jump != m_jump_list.end())
|
if (m_current_jump != m_jump_list.end())
|
||||||
{
|
m_jump_list.erase(m_current_jump+1, m_jump_list.end());
|
||||||
auto begin = m_current_jump;
|
|
||||||
if (&buffer() != &begin->buffer() or *begin != jump)
|
|
||||||
++begin;
|
|
||||||
m_jump_list.erase(begin, m_jump_list.end());
|
|
||||||
}
|
|
||||||
m_jump_list.erase(std::remove(begin(m_jump_list), end(m_jump_list), jump),
|
m_jump_list.erase(std::remove(begin(m_jump_list), end(m_jump_list), jump),
|
||||||
end(m_jump_list));
|
end(m_jump_list));
|
||||||
m_jump_list.push_back(jump);
|
m_jump_list.push_back(jump);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user