On 12/2/16 3:23 PM, LogicStuffs wrote:
> Setup: Readline 6.3, gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
> Identical behaviour with xterm and gnome-terminal.
>
> When I call readline with a prompt string containing CSI sequences and try
> to enter multiline input, and I get close before the end of the first line,
> the cursor is reset to the beginning of the line. Any more input then
> overwrites the prompt message, and then the previous input. After that, it
> is possible to fill the whole line with characters and get to the next
> line. Readline simply doesn't consider that not all of the prompt string's
> characters are printable.
This is from the description of rl_expand_prompt (which is called by
readline()) in the readline documentation:
"Applications may indicate that the prompt contains characters that take
up no physical screen space when displayed by bracketing a sequence of
such characters with the special markers @code{RL_PROMPT_START_IGNORE}
and @code{RL_PROMPT_END_IGNORE} (declared in @file{readline.h}). This may
be used to embed terminal-specific escape sequences in prompts."
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/
_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline