wrapping breaks within an utf-8 char
Submitted by Rafał Mużyło
Link to original bug (#787157)
Description
Needs a better description.
Anyway:
- having (a fairly standard) PS1='[\033[01;32m]\u@\h[\033[01;34m] \W $[\033[00m] ', create a dir with a very long name (for example '奮闘記奮闘記奮闘記奮闘記奮闘記奮闘記奮闘記奮闘記奮闘記奮闘記奮闘記奮闘記' and go into it
As PS1 states, current directory will be printed as a part of the promptt. The bug is that - as the name is very long - the name will get wrapped, but it gets wrapped inside an utf-8 sequence (for me (but that obviously changes with term's width) 1 byte stays in the first line, next two get into second one.
Also, there seems to be some confusion in counting char width, byte length and char count: line gets wrapped with several empty cells on the right side of first line, then - just to make things more interesting - in the second line, after the colored '$ ' there are again a few empty cells before the cursor. Now an odd thing happens when typing in that line: the first char get out put where the cursor was, but the cursor jumps then into its expected proper position - the second cell after '$ '. Upon Backspace, the trip is reversed...well, at least it's consistent.
...
Version: 0.46.x
Resolution: RESOLVED NOTGNOME