NetBSD-Bugs archive

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

lib/47539: libedit EL_PROMPT_ESC literal text does not print in sequence with cooked text



>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
>Organization:
>Environment:
Darwin da0603a-dhcp14.apple.com 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
>Description:
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.
>How-To-Repeat:
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.
>Fix:



Home | Main Index | Thread Index | Old Index