Commit e2843ede authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

text: let a Shift-selection persist when indenting and commenting


To achieve that, fake the Shift key being held when indenting/
unindenting/commenting/uncommenting.
Reported-by: default avatarBrand Huntsman <alpha@qzx.com>
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
...@@ -343,6 +343,7 @@ void do_indent(void) ...@@ -343,6 +343,7 @@ void do_indent(void)
set_modified(); set_modified();
refresh_needed = TRUE; refresh_needed = TRUE;
shift_held = TRUE;
} }
/* Return the number of bytes of whitespace at the start of the given text, /* Return the number of bytes of whitespace at the start of the given text,
...@@ -439,6 +440,7 @@ void do_unindent(void) ...@@ -439,6 +440,7 @@ void do_unindent(void)
set_modified(); set_modified();
refresh_needed = TRUE; refresh_needed = TRUE;
shift_held = TRUE;
} }
/* Perform an undo or redo for an indent or unindent action. */ /* Perform an undo or redo for an indent or unindent action. */
...@@ -550,6 +552,7 @@ void do_comment(void) ...@@ -550,6 +552,7 @@ void do_comment(void)
set_modified(); set_modified();
refresh_needed = TRUE; refresh_needed = TRUE;
shift_held = TRUE;
} }
/* Test whether the given line can be uncommented, or add or remove a comment, /* Test whether the given line can be uncommented, or add or remove a comment,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment