Bug#978986: invisible cursor when on column 1 after wrapping from final column
Egmont Koblinger
egmont at gmail.com
Fri Apr 28 21:00:41 BST 2023
Hi,
In this scenario that you describe, when running `cat`, the cursor is _not_
in column 1.
xterm (and apparently konsole too) think of it as the cursor being in the
last column, with a special "about to wrap" (can't recall the exact term,
sorry) property set.
VTE seems to more think about it as the cursor being one more column
further to the right, in a column that's outside of the viewable area.
This is important for the correct behavior of apps that when you reach the
last cell of the bottom row, the terminal does not yet scroll. If the
cursor would move to column 1, it would just as well need to move to the
row just below the viewport, and again it would be invisible.
You can also confirm that the cursor haven't yet moved to the next row by
pressing backspace (which results in an utterly broken experience, sigh),
noting that reverse wraparound (e.g. backspace across linebreaks) is
disabled by default; or sending other escape sequences to move the cursor
left or move it to a certain column within its current row.
There's just no good solution for this problem, and indeed, VTE chose a
slightly different graphical representation than xterm, one that's not
necessarily better or worse.
> This does not happen when doing the same kind of wrapping on the bash
> prompt, but I imagine bash might be doing its own cursor positioning,
> and so avoid the bug.
You are absolutely correct here. Also, note that if you're typing the
command in the terminal's bottom row, it scrolls the contents upwards as
soon as you type a character into the last column. This way it can show the
cursor in the new empty last line, column 1. Bash is free to do it by using
its own cursor positioning. The default behavior of the terminal mustn't
scroll yet.
cheers,
egmont
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnome-maintainers/attachments/20230428/1b3b23c2/attachment.htm>
More information about the pkg-gnome-maintainers
mailing list