[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] text: let a Shift-selection persist when indenting
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] [PATCH] text: let a Shift-selection persist when indenting and commenting |
Date: |
Sun, 10 Dec 2017 14:54:15 +0100 |
To achieve that, fake Shift being held when indenting/unindenting/
commenting/uncommenting.
Reported-by: Brand Huntsman <address@hidden>
---
src/text.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/text.c b/src/text.c
index c9a5a923..c88a1b7c 100644
--- a/src/text.c
+++ b/src/text.c
@@ -345,6 +345,7 @@ void do_indent(void)
set_modified();
refresh_needed = TRUE;
+ shift_held = TRUE;
}
/* Return the number of bytes of whitespace at the start of the given text,
@@ -441,6 +442,7 @@ void do_unindent(void)
set_modified();
refresh_needed = TRUE;
+ shift_held = TRUE;
}
/* Perform an undo or redo for an indent or unindent action. */
@@ -552,6 +554,7 @@ void do_comment(void)
set_modified();
refresh_needed = TRUE;
+ shift_held = TRUE;
}
/* Test whether the given line can be uncommented, or add or remove a comment,
--
2.14.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nano-devel] [PATCH] text: let a Shift-selection persist when indenting and commenting,
Benno Schulenberg <=