NetBSD Problem Report #43648

From www@NetBSD.org  Tue Jul 20 19:45:52 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D6AE463BB10
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 20 Jul 2010 19:45:51 +0000 (UTC)
Message-Id: <20100720194551.A709E63BADB@www.NetBSD.org>
Date: Tue, 20 Jul 2010 19:45:51 +0000 (UTC)
From: M.Drochner@fz-juelich.de
Reply-To: M.Drochner@fz-juelich.de
To: gnats-bugs@NetBSD.org
Subject: libedit history wide char inconsistencies
X-Send-Pr-Version: www-1.0

>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.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.