NalaGinrut/guile-colorized — pull request #7 by brandoninvergo (2014-10-13 10:08:47+00:00)
Title: fix #5:

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.