NetBSD-Bugs archive

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

Re: bin/42641:



The following reply was made to PR bin/42641; it has been noted by GNATS.

From: "Michael L. Hitch" <mhitch%lightning.msu.montana.edu@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/42641: 
Date: Tue, 19 Jan 2010 13:25:10 -0700 (MST)

 On Tue, 19 Jan 2010, dyoung%skyking.ojctech.com@localhost wrote:
 
 > Type:
 >      set -o emacs
 >      ls
 >
 > See if Ctrl-P gives you the previous command.  (It will not.)  Try
 > Up Arrow.  It will work.  Now, type Ctrl-A followed immediately by
 > Ctrl-E.  Is the cursor on 's' or the blank after 's' ?  It ought
 > to be on the blank, but it will be on 's'.
 >> Fix:
 
    This would be due to the addition of a wrapper to convert to the new 
 wide-character version of libedit.  Libedit appears to default to using
 the vi edit mode, and the wrapper ignores any attempt to set the editor 
 mode using el_set(EL_EDITOR, "xxx").
 
    The following change adds EL_EDITOR back to el_set():
 
 Index: lib/libedit/eln.c
 ===================================================================
 RCS file: /cvsroot/src/lib/libedit/eln.c,v
 retrieving revision 1.4
 diff -u -p -r1.4 eln.c
 --- lib/libedit/eln.c  12 Jan 2010 19:40:50 -0000      1.4
 +++ lib/libedit/eln.c  16 Jan 2010 22:27:46 -0000
 @@ -118,6 +118,11 @@ el_set(EditLine *el, int op, ...)
                ret = el_wset(el, op, va_arg(ap, char *));
                break;
 
 +      case EL_EDITOR:
 +              ret = el_wset(el, op, ct_decode_string(va_arg(ap, char *),
 +                  &el->el_lgcyconv));
 +              break;
 +
        case EL_SIGNAL:         /* int */
        case EL_EDITMODE:
        case EL_UNBUFFERED:
 
 --
 Michael L. Hitch                       mhitch%montana.edu@localhost
 Computer Consultant
 Information Technology Center
 Montana State University       Bozeman, MT     USA
 


Home | Main Index | Thread Index | Old Index