Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15793
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Cursor can land before the prompt after calling beginning-of-line |
| Date | 2020-01-08 09:35 -0500 |
| Message-ID | <mailman.2251.1578494169.1979.bug-bash@gnu.org> (permalink) |
| References | <o8ws5WGd27W_UrU-HfgvG5YKDLgw5JJ9kUWJvNwxNPa_xYArQg8SCv3kZkKvavq44VXiGA6xUUcqpE-5yMLHh9jVLhabKOv_dno-Dh2ZQTg=@palard.fr> <6336584d-954c-6ec4-13d7-2a6e1d4e8e1b@case.edu> |
On 1/8/20 4:13 AM, Julien Palard wrote: > It can be reproduced on Debian bullseye with bash 5.0.11 on urxvt and xterm and by a friend on MacOS with bash 3.2.57. > > With this procedure I'm able to reproduce it consistently: > > - Move ~/.bashrc elsewhere just to start clean > - Start a new terminal (in my case tput cols tells it's 79 columns, beware, the bug varies according to the terminal width). > - run `bash --norc` in it, to start clean > - Prompt in my case is `bash-5.0$ `, beware, the bug varies according to the length of the prompt. > - type `printf "Hello World\n "` (1) > - hit the `uparrow` of your keyboard to see the printf again (2) > - hit C-a (bash shortcut for beginning-of-line) (3) Readline assumes it starts in column 0. If it doesn't know the physical screen position of the cursor when it starts, it can't make correct decisions about redisplay. Sometimes it wants to go to the beginning of the line and redraw/erase characters, sometimes it wants to move backwards and do it, but all these decisions assume that it knows where it is on the line. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Cursor can land before the prompt after calling beginning-of-line Chet Ramey <chet.ramey@case.edu> - 2020-01-08 09:35 -0500
csiph-web