From da4b7e430f2ff5704db55fbe3b94236daca4eb19 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 21 Jan 2019 12:18:37 +0100 Subject: [PATCH] files: retain a Shift-selected region when switching between buffers The user did not move the cursor nor intend to move the cursor, so leave things as they are. This fixes https://savannah.gnu.org/bugs/?55535. Indirectly-reported-by: David Lawrence Ramsey --- src/files.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/files.c b/src/files.c index 02d7ca15..81c10732 100644 --- a/src/files.c +++ b/src/files.c @@ -661,6 +661,9 @@ void switch_to_adjacent_buffer(bool to_next) /* Ensure that the main loop will redraw the help lines. */ currmenu = MMOST; + /* Prevent a possible Shift selection from getting cancelled. */ + shift_held = TRUE; + /* Indicate on the status bar where we switched to. */ mention_name_and_linecount(); }