NetBSD Problem Report #47539

From  Wed Feb  6 22:43:47 2013
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id D8AC763E705
	for <>; Wed,  6 Feb 2013 22:43:46 +0000 (UTC)
Message-Id: <>
Date: Wed,  6 Feb 2013 22:43:46 +0000 (UTC)
Subject: libedit EL_PROMPT_ESC literal text does not print in sequence with cooked text
X-Send-Pr-Version: www-1.0

>Number:         47539
>Category:       lib
>Synopsis:       libedit EL_PROMPT_ESC literal text does not print in sequence with cooked text
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 06 22:45:00 +0000 2013
>Originator:     Joe Groff
>Release:        N/A
Darwin 12.2.1 Darwin Kernel Version 12.2.1: Thu Oct 18 12:13:47 PDT 2012; root:xnu-2050.20.9~1/RELEASE_X86_64 x86_64
Editline supports a "literal mode" escape character for prompt_print that in theory allows escape codes to be sent directly to the terminal without affecting editline's internal state. However, editline draws normal prompt characters to its internal virtual buffer, but it immediately draws literal-mode characters to the terminal, so a prompt cannot contain literal-mode strings interleaved with normal strings. The literal-mode strings will all be drawn first before the buffer is printed.
1. Build the libedit test program in src/lib/libedit/TEST/wtc1.c.
2. Run the program in a script as follows:

$ script
$ ./wtc1

The 'Edit$' prompt should be colorized but is not.

3. ^D twice to exit out of wtc1 and the script session.
4. Hex dump the script with 'hexdump typescript'. Note that the "\033[7m" and "\033[0m" escape sequences were printed one after the other instead of surrounding the 'Edit$' prompt.

NetBSD Home
NetBSD PR Database Search

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