[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH/RFC] fix crash when using certain keybindings
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] [PATCH/RFC] fix crash when using certain keybindings |
Date: |
Sun, 06 Apr 2014 10:39:47 +0200 |
On Sun, Apr 6, 2014, at 4:50, Mike Frysinger wrote:
> if you enable debug output, do you see the shortcut_init func getting called
> multiple times ? it didn't seem correct for that to be reinitialized for
> some
> seemingly unrelated things (like loading into a new buffer).
With debugging, doing the 'src/nano -I' and then ^R ^M ^X,
I see this in the debugging output:
parse_kbinput(): kbinput = 18, meta_key = FALSE, func_key = FALSE, escapes = 0,
byte_digits = 0, retval = 18
get_shortcut(): kbinput = 18, meta_key = FALSE, func_key = FALSE
matched seq "^R", and btw meta was 0 (menus 1 = 1)
parse_kbinput(): kbinput = 13, meta_key = FALSE, func_key = FALSE, escapes = 0,
byte_digits = 0, retval = 13
get_shortcut(): kbinput = 13, meta_key = FALSE, func_key = FALSE
matched seq "^M", and btw meta was 0 (menus 40 = 5fff)
get_shortcut(): kbinput = 13, meta_key = FALSE, func_key = FALSE
matched seq "^M", and btw meta was 0 (menus 40 = 5fff)
answer = ""
(Why does it match ^M twice? That doesn't seem right.)
[and then it reinitializes the shortcuts]
parse_kbinput(): kbinput = 24, meta_key = FALSE, func_key = FALSE, escapes = 0,
byte_digits = 0, retval = 24
get_shortcut(): kbinput = 24, meta_key = FALSE, func_key = FALSE
matched seq "^X", and btw meta was 0 (menus 1 = 501)
(This is without the sanitizing switch, and both with and without your patch.)
The shortcut list getting reinitialized seems to be intentional, though:
a full justify might have been done (M-J is present in all menus -- mistakenly)
which would have resulted in Uncut being temporarily replaced by Unjustify.
Benno
--
http://www.fastmail.fm - Faster than the air-speed velocity of an
unladen european swallow