diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-07-27 23:53:16 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-07-27 23:53:16 +0100 |
| commit | 623fcd88ea57bbaa8458b0529efe22caf14f1ed0 (patch) | |
| tree | 6079d64dabc47555734f94871ab95d03e0b5856a | |
| parent | 14198fadb408e7a49bf1180174184aa2bdfbc669 (diff) | |
Do not avoid end of lines after selecting modified ranges in undo
Fixes #751
| -rw-r--r-- | src/normal.cc | 2 | ||||
| -rw-r--r-- | test/regression/751-wrong-selection-after-undo/cmd | 1 | ||||
| -rw-r--r-- | test/regression/751-wrong-selection-after-undo/in | 3 | ||||
| -rw-r--r-- | test/regression/751-wrong-selection-after-undo/selections | 3 |
4 files changed, 7 insertions, 2 deletions
diff --git a/src/normal.cc b/src/normal.cc index 67937351..31afeb90 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -1431,7 +1431,6 @@ void undo(Context& context, NormalParams params) auto ranges = compute_modified_ranges(buffer, timestamp); if (not ranges.empty()) context.selections_write_only() = std::move(ranges); - context.selections().avoid_eol(); } else 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); if (not ranges.empty()) context.selections_write_only() = std::move(ranges); - context.selections().avoid_eol(); } else context.print_status({ "nothing left to redo", get_face("Information") }); diff --git a/test/regression/751-wrong-selection-after-undo/cmd b/test/regression/751-wrong-selection-after-undo/cmd new file mode 100644 index 00000000..a43f0dd7 --- /dev/null +++ b/test/regression/751-wrong-selection-after-undo/cmd @@ -0,0 +1 @@ +mS\d+<ret>du diff --git a/test/regression/751-wrong-selection-after-undo/in b/test/regression/751-wrong-selection-after-undo/in new file mode 100644 index 00000000..e7159c3e --- /dev/null +++ b/test/regression/751-wrong-selection-after-undo/in @@ -0,0 +1,3 @@ +{ +11, 22 +}; diff --git a/test/regression/751-wrong-selection-after-undo/selections b/test/regression/751-wrong-selection-after-undo/selections new file mode 100644 index 00000000..da9a2398 --- /dev/null +++ b/test/regression/751-wrong-selection-after-undo/selections @@ -0,0 +1,3 @@ +{ +:, : +} |
