Avoid eol after undo/redo
This commit is contained in:
parent
eee2cb3a6e
commit
c454cf1379
|
@ -1240,6 +1240,7 @@ void undo(Context& context, NormalParams)
|
||||||
auto ranges = compute_modified_ranges(buffer, timestamp);
|
auto ranges = compute_modified_ranges(buffer, timestamp);
|
||||||
if (not ranges.empty())
|
if (not ranges.empty())
|
||||||
context.set_selections(std::move(ranges));
|
context.set_selections(std::move(ranges));
|
||||||
|
context.selections().avoid_eol();
|
||||||
}
|
}
|
||||||
else if (not res)
|
else if (not res)
|
||||||
context.print_status({ "nothing left to undo", get_face("Information") });
|
context.print_status({ "nothing left to undo", get_face("Information") });
|
||||||
|
@ -1256,6 +1257,7 @@ void redo(Context& context, NormalParams)
|
||||||
auto ranges = compute_modified_ranges(buffer, timestamp);
|
auto ranges = compute_modified_ranges(buffer, timestamp);
|
||||||
if (not ranges.empty())
|
if (not ranges.empty())
|
||||||
context.set_selections(std::move(ranges));
|
context.set_selections(std::move(ranges));
|
||||||
|
context.selections().avoid_eol();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (not res)
|
else if (not res)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user