[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 ninj...@gmail.com changed: What|Removed |Added CC||ninj...@gmail.com --- Comment #4 from ninj...@gmail.com --- This is probably bash occasionally clearing to the beginning of line when the window is resized (SIGWINCH). On my system, zsh forces a newline, and ksh clears to the beginning of line, but leaves the rest of the line until the end untouched, which helps to see the real culprit. Can you confirm whether you are using bash, and whether other shells show different behavior? -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 Eric Armbruster changed: What|Removed |Added Status|REPORTED|CONFIRMED Ever confirmed|0 |1 --- Comment #5 from Eric Armbruster --- I have now tested it in both bash and zsh. For me the issue is only present in zsh. -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 --- Comment #6 from ninj...@gmail.com --- Can you try after the following command? setopt PROMPT_SP PROMPT_CR which tells zsh to preserve a partial line: >PROMPT_CR (+V) > Print a carriage return just before printing a > prompt in the line editor. This is on by de‐ > fault as multi-line editing is only possible if > the editor knows where the start of the line ap‐ > pears. > >PROMPT_SP > Attempt to preserve a partial line (i.e. a line > that did not end with a newline) that would oth‐ > erwise be covered up by the command prompt due > to the PROMPT_CR option. This works by out‐ > putting some cursor-control characters, includ‐ > ing a series of spaces, that should make the > terminal wrap to the next line when a partial > line is present (note that this is only success‐ > ful if your terminal has automatic margins, > which is typical). -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 --- Comment #7 from Eric Armbruster --- I still have the same outcome after applying those options. -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 ninj...@gmail.com changed: What|Removed |Added CC||cbc.al...@gmail.com --- Comment #8 from ninj...@gmail.com --- There is some special-casing in konsole for zsh (https://invent.kde.org/utilities/konsole/-/commit/25a24bf347a3138f7146a220621160fd069eaca7). AFAICT, combined with PROMPT_SP PROMPT_CR it will think a previous partial line is a command prompt, which is what youduda at comment 3 is seeing. I'm not sure there is a way to tell a prompt from a previous partial line. Now, as to the losing characters issue, we'll have to investigate further. -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 --- Comment #9 from ninj...@gmail.com --- Adding a newline in PROMPT_EOL_MARK may help. Besides that, here are some interesting links: https://github.com/romkatv/powerlevel10k/issues/1200 Regarding the VT sequence, contour (christianparpart's terminal) uses DECSET 2027 (https://github.com/contour-terminal/contour/blob/master/src/contour/shell-integration.zsh). Semantic prompts/OSC 133 (https://gitlab.freedesktop.org/Per_Bothner/specifications/blob/master/proposals/semantic-prompts.md) may have fitted the same purpose, kitty and wezterm have shell integration scripts that add those (https://github.com/kovidgoyal/kitty/blob/master/shell-integration/zsh/kitty-integration https://github.com/wez/wezterm/blob/main/assets/shell-integration/wezterm.sh). https://gitea.henrywithu.com/henry/powerlevel10k/src/commit/0b9829d409cba321f77729e1010c5b0480529cfa/README.md#zsh-bug -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 --- Comment #10 from Eric Armbruster --- Hi ninjalj, thank you for putting so much effort into this. Sadly, setting PROMPT_EOL_MARK='\n' or PROMPT_EOL_MARK=\n does not seem to help. I tried reading a bit into those links, but they go a bit too deep into terminals for me. I also decided to give kitty a quick try. I couldn't reproduce the issue with this terminal emulator. -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 Bug Janitor Service changed: What|Removed |Added Status|CONFIRMED |ASSIGNED --- Comment #11 from Bug Janitor Service --- A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/595 -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 --- Comment #12 from ninj...@gmail.com --- That would have been: PROMPT_EOL_MARK=" " or PROMPT_EOL_MARK=$'\n' but unfortunately zsh prints it always when PROMPT_CR and PROMPT_SP are set, adding an extra newline if the last command executed ended in a newline. On another order of things, may I ask if your configuration sends semantic prompt markers? They are typically sent from a precmd hook function (which can be listed with "add-zsh-hook -L", and the function shown with "functions "), or printed as part of PS1. -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 Nate Graham changed: What|Removed |Added CC||n...@kde.org -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 --- Comment #13 from Eric Armbruster --- Tried again, this time with PROMPT_EOL_MARK set as you suggested. This seems to have done the job. Reflow works as expected. That is already a nice workaround :) Regarding your other question, this is what add-zsh-hook -L returns: typeset -g -a preexec_functions=( omz_termsupport_preexec _zsh_highlight_preexec_hook ) typeset -g -a precmd_functions=( omz_termsupport_precmd vcs_info _z_precmd _zsh_highlight_main__precmd_hook _zsh_autosuggest_start ) and the following is my PS1 %{$oxide_limegreen%}%~%{$oxide_reset_color%} ${vcs_info_msg_0_} %(?.%{%F{white}%}.%{$oxide_red%})%(!.#.❯)%{$oxide_reset_color%} -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 tcanabr...@kde.org changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED Latest Commit||https://invent.kde.org/util ||ities/konsole/commit/8345f2 ||4ee9313e494c66fc973051c2fd7 ||51d4c87 --- Comment #14 from tcanabr...@kde.org --- Git commit 8345f24ee9313e494c66fc973051c2fd751d4c87 by Tomaz Canabrava, on behalf of Luis Javier Merino Morán. Committed on 07/02/2022 at 11:18. Pushed by tcanabrava into branch 'master'. More robust reflow on zsh with semantic prompts Improve the logic for avoiding doing reflow of zsh prompts (zsh will repaint the prompt and command line) when there are semantic prompt markers (OSC 133). M +10 -2src/Screen.cpp M +6-0src/Vt102Emulation.cpp M +1-0src/characters/Character.h https://invent.kde.org/utilities/konsole/commit/8345f24ee9313e494c66fc973051c2fd751d4c87 -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 Nate Graham changed: What|Removed |Added Version Fixed In||22.04 -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 --- Comment #1 from Eric Armbruster --- Created attachment 145053 --> https://bugs.kde.org/attachment.cgi?id=145053&action=edit four characters missing second attachment -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 --- Comment #2 from Eric Armbruster --- Created attachment 145054 --> https://bugs.kde.org/attachment.cgi?id=145054&action=edit third Sorry for the spam but I did not know how I could add multiple attachments otherwise. how it should be = first.png four characters missing = second.png -- You are receiving this mail because: You are watching all bug changes.
[konsole] [Bug 447830] Reflow broken for strings without newline
https://bugs.kde.org/show_bug.cgi?id=447830 youd...@gmail.com changed: What|Removed |Added CC||youd...@gmail.com --- Comment #3 from youd...@gmail.com --- Created attachment 145061 --> https://bugs.kde.org/attachment.cgi?id=145061&action=edit Line wrapping only works if line is terminated with a newline character Can confirm this see the attached image. I entered some text in the console (left) then resized the window (middle). The text is just simply cut-off instead of wrapped into multiple lines. When using echo without '-n' it works as expected (see the right). Tested with bash and zsh. -- You are receiving this mail because: You are watching all bug changes.