nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] Patch for !ncurses


From: David Ramsey
Subject: Re: [Nano-devel] Patch for !ncurses
Date: Mon, 3 Dec 2007 12:55:59 -0600

On Nov 30, 2007 11:09 PM, OBATA Akio <address@hidden> wrote:
> Hi!
>
> Would you merge following patches against version 2.0.6?
>   * 
> http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/editors/nano/patches/patch-aa?rev=1.6
>   * 
> http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/editors/nano/patches/patch-ab?rev=1.1
>
> Fixes problems with NetBSD's curses (and other !ncurses platforms?).
>   * http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=37133
>   * http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=37133
>
> I don't know why ncurses works fine without those patches.
> But
>   * Need raw mode to pass special keys (ex. Ctrl-C) to applicaions.
>   * Need refresh after move (wmove) to redraw cursor.
> See also spec of curses and termios.

Thank you.  I'll look into fixing these, but I can't merge the above
patches verbatim without answers to a few questions:

Regarding patch 1: The reason nano doesn't use raw mode is because it
needs to maintain compatibility with Slang's (horribly screwed up)
curses emulation, under which raw() acts exactly like cbreak().
However, disable_signals() uses termios to turn off the ISIG flag,
which, if I've read the manual page correctly, should disable all the
special keys the same way raw mode would.  (At least it does under
ncurses.)  nano 1.2 disabled the special keys individually, which didn't
work under Cygwin, which is why things were changed.  So, is this a
difference in NetBSD curses, NetBSD termios, or both?

Regarding patch 2: A wrefresh() every time the cursor moves gets
expensive in terms of screen updates.  Also, nano uses wnoutrefresh()
after reset_cursor() in other places.  So, does adding
"wnoutrefresh(edit);" instead of "wrefresh(edit);" in the place the
second patch does work with NetBSD curses?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]