[Top][All Lists]

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

Re: PROMPT_COMMAND causing strange cursor behavior

From: Chet Ramey
Subject: Re: PROMPT_COMMAND causing strange cursor behavior
Date: Tue, 28 Apr 2015 10:26:10 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 4/27/15 1:26 PM, Martin Sebor wrote:

> Bash Version: 4.3
> Patch Level: 33
> Release Status: release
> Description:
> When the PROMPT_COMMAND variable is set to a command such a printf
> it causes the cursor to jump to disappear or jump to the wrong
> positions when typing text that spans more than physical terminal
> line. The problem exists in at least Bash 4.2 and 4.3 (but likely
> earlier versions as well).

This isn't exactly a bug.  If readline doesn't know where the cursor is
when it starts to perform redisplay, it's not going to be able to put the
cursor in the right position.  Readline assumes that cursor starts in
column 0 and makes redisplay decisions based on that.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]