Do not avoid end of lines after selecting modified ranges in undo
Fixes #751
This commit is contained in:
parent
14198fadb4
commit
623fcd88ea
|
@ -1431,7 +1431,6 @@ void undo(Context& context, NormalParams params)
|
||||||
auto ranges = compute_modified_ranges(buffer, timestamp);
|
auto ranges = compute_modified_ranges(buffer, timestamp);
|
||||||
if (not ranges.empty())
|
if (not ranges.empty())
|
||||||
context.selections_write_only() = std::move(ranges);
|
context.selections_write_only() = std::move(ranges);
|
||||||
context.selections().avoid_eol();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
context.print_status({ "nothing left to undo", get_face("Information") });
|
context.print_status({ "nothing left to undo", get_face("Information") });
|
||||||
|
@ -1446,7 +1445,6 @@ void redo(Context& context, NormalParams params)
|
||||||
auto ranges = compute_modified_ranges(buffer, timestamp);
|
auto ranges = compute_modified_ranges(buffer, timestamp);
|
||||||
if (not ranges.empty())
|
if (not ranges.empty())
|
||||||
context.selections_write_only() = std::move(ranges);
|
context.selections_write_only() = std::move(ranges);
|
||||||
context.selections().avoid_eol();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
context.print_status({ "nothing left to redo", get_face("Information") });
|
context.print_status({ "nothing left to redo", get_face("Information") });
|
||||||
|
|
1
test/regression/751-wrong-selection-after-undo/cmd
Normal file
1
test/regression/751-wrong-selection-after-undo/cmd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
mS\d+<ret>du
|
3
test/regression/751-wrong-selection-after-undo/in
Normal file
3
test/regression/751-wrong-selection-after-undo/in
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
11, 22
|
||||||
|
};
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
:, :
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user