|
From: | Mahyar Abbaspour |
Subject: | Re: [Nano-devel] [PATCH] Window resize handling |
Date: | Wed, 22 Apr 2015 20:30:11 +0430 |
Hi Mahyar,
Some nitpicks:
> + if (kbinput == KEY_WINCH) {
> + browser_refresh();
> + old_selected = selected;
This last one seems superfluous, as it was done just seven lines
earlier.
(Also, please use four spaces for the first, third, fifth level indent;
it's not all tabs everywhere. Use M-P to see the difference.)
> --- src/text.c (revision 5213)
> +++ src/text.c (working copy)
> @@ -2207,15 +2207,6 @@
>
> edit_refresh();
>
> -#ifndef NANO_TINY
> - /* We're going to set jump_buf so that we return here after a
> - * SIGWINCH instead of to main(). Indicate this. */
> - jump_buf_main = FALSE;
> -
> - /* Return here after a SIGWINCH. */
> - sigsetjmp(jump_buf, 1);
> -#endif
Well... removing this breaks the special case for Unjustify:
right after a ^J it is possible to do an unjustify with ^U.
With your patch it is no longer possible to unjustify when
a window resize took place right after the ^J. With current
nano this works fine. (True, a highly unlikely scenario,
but...).
> /* Read in a character and interpret it. Continue doing this until
> * we get a recognized value or sequence. */
> - while ((kbinput = parse_kbinput(win)) == ERR)
> - ;
> + do {
> + kbinput = parse_kbinput(win);
> + } while (kbinput == ERR
> +#ifndef NANO_TINY
> + && kbinput != KEY_WINCH
> +#endif
> + );
Hm? I don't see what the "&& kbinput != KEY_WINCH" brings.
When kbinput == ERR it necessarily means it isn't anything else.
window_resize-2.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |