selecting: cancel the softmark upon any attempt to move the cursor
This assumes that all movement functions are located together, starting with to_first_line() and ending with do_right(). This fixes https://savannah.gnu.org/bugs/?53195. Reported-by: Brand Huntsman <alpha@qzx.com>master
parent
082e5db4b7
commit
6f4f1878fc
|
@ -1762,9 +1762,12 @@ int do_input(bool allow_funcs)
|
||||||
/* When the marked region changes without Shift being held,
|
/* When the marked region changes without Shift being held,
|
||||||
* discard a soft mark. And when the marked region covers a
|
* discard a soft mark. And when the marked region covers a
|
||||||
* different set of lines, reset the "last line too" flag. */
|
* different set of lines, reset the "last line too" flag. */
|
||||||
if (openfile->mark && (openfile->current != was_current ||
|
if (openfile->mark) {
|
||||||
openfile->current_x != was_x)) {
|
if (!shift_held && openfile->kind_of_mark == SOFTMARK &&
|
||||||
if (!shift_held && openfile->kind_of_mark == SOFTMARK) {
|
(openfile->current != was_current ||
|
||||||
|
openfile->current_x != was_x ||
|
||||||
|
(shortcut->func >= to_first_line &&
|
||||||
|
shortcut->func <= do_right))) {
|
||||||
openfile->mark = NULL;
|
openfile->mark = NULL;
|
||||||
refresh_needed = TRUE;
|
refresh_needed = TRUE;
|
||||||
} else if (openfile->current != was_current)
|
} else if (openfile->current != was_current)
|
||||||
|
|
Loading…
Reference in New Issue