Bug 414987

Summary: while editing commandline with unicode symbols, text disappears or inadequate
Product: [Applications] konsole Reporter: mintytail
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: normal CC: aspotashev
Priority: NOR    
Version: 19.08.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description mintytail 2019-12-09 17:35:13 UTC
SUMMARY
If I have unicode symbols in current line, which is longer, than window width, either pasted or in shell prompt (regardless of the shell program, zsh, sh), and if i try to delete symbols from the middle of the string, position of cursor and string rendering is inadequate, making me unable to see the changes.

STEPS TO REPRODUCE
1. make Konsole window 80 charachters wide with running "sh" in it (i'm using zsh so i just run sh and execute "reset")
2. paste that string (it is without newlines) into sh prompt: 
->  scada git:(development) ✗ ln -s "cloud interface.default.ini" "../../../../../../cloud interface/cloud interface.default.ini"
3. observe no "newline"
4. move cursor back to the beginning of the line, press "delete" (maybe until entered string become shorter, than window width)
5. observe cursor moving down for some reason and mess in editing string

Another way to reproduce
1. Using zsh with robbyrussell theme (https://ohmyz.sh) inside the git repository (only to have some unicode symbols, like "✗" in the prompt)
2. Make window 80 charachters wide
3. paste long line, to be longer than window width
4. Using "←" key move to the previous line
5. Press "Home"
6. Observe cursor not in the beginning of line, but couple charachters to the right (also, editing edits shifted string, not as on screen)

OBSERVED RESULT
impossible to edit long commands with unicode charachters on the same line

EXPECTED RESULT
unicode charachters should not affect behaviour of the edit

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: kded5 5.61.0
(available in About System)
KDE Plasma Version: plasmashell 5.16.4
KDE Frameworks Version: 
Qt Version: QMake version 3.1  Using Qt version 5.13.0 in /usr/lib

ADDITIONAL INFORMATION