From c454cf137971fda09c0c0a3af6acea952efc2f3a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 18 Dec 2014 23:17:38 +0000 Subject: [PATCH] Avoid eol after undo/redo --- src/normal.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/normal.cc b/src/normal.cc index d1e311dc5..e4b9c8d15 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -1240,6 +1240,7 @@ void undo(Context& context, NormalParams) auto ranges = compute_modified_ranges(buffer, timestamp); if (not ranges.empty()) context.set_selections(std::move(ranges)); + context.selections().avoid_eol(); } else if (not res) 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); if (not ranges.empty()) context.set_selections(std::move(ranges)); + context.selections().avoid_eol(); } else if (not res)