You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not quite sure what the purpose of the x-- is. If the goal is to always cap it within the max columns, then that won't necessarily work properly here.
On an unrelated note, cursorDown and vPositionRelative contain identical code. cursorForward and hPositionRelative also contain identical code. Also, cursorPosition and hVPosition appear to have logically identical code but hVPosition is shorter and more readable, IMO.
The text was updated successfully, but these errors were encountered:
Well the code duplication part is the try to fix the wrong positioning for certain methods, while others have not this "sanity" check yet. I guess there are more that can show this overflow (not checked), some methods even try to fix it on enter with a precheck (print for example always checks this before inserting chars to the buffer).
It happens to work atm with this mixture of pre- and postcheck/corrections, still the cursor is sometimes off (top shows the cursor wrongly in first column during screen refreshs). #1434 tried to address this but I kinda got distracted from it (and the fix was more an ugly hack).
It appears to be possible to put the
buffer.x
position into an odd state with certain CSI sequences.Sample
Or:
Analysis
Not quite sure what the purpose of the
x--
is. If the goal is to always cap it within the max columns, then that won't necessarily work properly here.On an unrelated note,
cursorDown
andvPositionRelative
contain identical code.cursorForward
andhPositionRelative
also contain identical code. Also,cursorPosition
andhVPosition
appear to have logically identical code buthVPosition
is shorter and more readable, IMO.The text was updated successfully, but these errors were encountered: