NetBSD-Bugs archive

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

lib/43648: libedit history wide char inconsistencies



>Number:         43648
>Category:       lib
>Synopsis:       libedit history wide char inconsistencies
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 20 19:50:01 +0000 2010
>Originator:     Matthias Drochner
>Release:        current
>Organization:
KFA
>Environment:
NetBSD-current/i386
>Description:
History handling on the gnuplot command line doesn't work. The
history entries one gets from pressing <cursor-up> or cntl-p
contain only the first character. The persistent history file
(~/.gnuplot_history) and the output of gnuplot's "history"
command look OK. gnuplot uses libedit's "readline" emulation.
Some research has shown that the history events are stored
as wide char arrays by add_history() but interpreted as normal
chars by HIST_FIRST() etc. The latter depends on some NARROW_HISTORY
flag which depends on the locale setting.
This looks quite inconsistent, and it is not obvious how this
was designed to work. So I can't provide a simple fix.
As workarounds, using a libedit compiled without widechar support
helps. Disabling NARROW_HISTORY worked as much as it made the
command line history work but gnuplot's history searching
("history ?term") still didn't yield results.
>How-To-Repeat:
use gnuplot
>Fix:
Does it make sense to keep that NARROW_HISTORY thing?
If not, always store history entries as widechars if widechar
support is enabled.



Home | Main Index | Thread Index | Old Index