Skip to content

fix #5:

Nala Ginrut requested to merge brandoninvergo:fix-readline-prompt into master

Created by: brandoninvergo

The bug you saw is that it calculated the prompt length as far longer than it should be because it included the escape characters; thus, point was set somewhere far to the right of the visible prompt characters. Readline requires extra escape characters to tell it to ignore escape chars when calculating the prompt length. See the Readline documentation for rl_expand_prompt (info readline Programming "Readline Convenience Functions" Redisplay) you'll see that you need to add the special markers RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE, which should be \x01 and \x02, respectively.

Merge request reports