]> git.wh0rd.org Git - nano.git/commitdiff
Okay, now let unjustify work with the mouse too :P
authorChris Allegretta <chrisa@asty.org>
Sun, 6 May 2001 02:34:31 +0000 (02:34 +0000)
committerChris Allegretta <chrisa@asty.org>
Sun, 6 May 2001 02:34:31 +0000 (02:34 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@641 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

nano.c

diff --git a/nano.c b/nano.c
index 3ea4568d9b56978270a8a3f3c92c6c23359828c0..61c3f5546e16ace6d6334e23a77fb21722619027 100644 (file)
--- a/nano.c
+++ b/nano.c
@@ -2011,6 +2011,19 @@ int do_justify(void)
 
     /* Now get a keystroke and see if it's unjustify; if not, unget the keystroke 
        and return */
+
+#ifndef DISABLE_MOUSE
+#ifdef NCURSES_MOUSE_VERSION
+
+    /* If it was a mouse click, parse it with do_mouse and it might become
+       the unjustify key.  Else give it back to the input stream.  */
+    if ((kbinput = wgetch(edit)) == KEY_MOUSE)
+       do_mouse();
+    else
+       ungetch(kbinput);
+#endif
+#endif
+
     if ((kbinput = wgetch(edit)) != NANO_UNJUSTIFY_KEY) {
        ungetch(kbinput);
        blank_statusbar_refresh();