commit d3c0fe392316400257b57efcacc9b313808cf1b9
parent 997826d79403d33287ee97ddcac7c6693b5e2d29
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 28 Dec 2018 18:07:28 +0100
options: make --rawsequences disable --mouse, to prevent entering junk
When using --raw, ncurses does not catch and convert any mouse event,
and thus the coordinates of a mouse click would get inserted into the
buffer as seemingly random characters. So, let --rawsequences override
and disable --mouse, to prevent the accidental entering of junk.
This fixes https://savannah.gnu.org/bugs/?55303.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -2430,6 +2430,10 @@ int main(int argc, char **argv)
#endif
}
+ /* When getting untranslated escape sequences, the mouse cannot be used. */
+ if (ISSET(RAW_SEQUENCES))
+ UNSET(USE_MOUSE);
+
#ifdef ENABLE_HISTORIES
/* Initialize the pointers for the Search/Replace/Execute histories. */
history_init();