<div dir="ltr"><div>Hi,</div><div><br></div><div>In this scenario that you describe, when running `cat`, the cursor is _not_ in column 1.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.<br></div><div><br></div><div>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.<br></div><div><br></div><div>> This does not happen when doing the same kind of wrapping on the bash<br>> prompt, but I imagine bash might be doing its own cursor positioning,<br>> and so avoid the bug.<br></div><div><br></div><div>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.<br></div><div><br></div><div>cheers,</div><div>egmont</div><div><br></div></div>