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 <pooka109@gmail.com>
master
Benno Schulenberg 2019-01-21 12:18:37 +01:00
parent e771503ee5
commit da4b7e430f
1 changed files with 3 additions and 0 deletions

View File

@ -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();
}