tolstoyevsky / gits

Web-based terminal emulator
Apache License 2.0
7 stars 1 forks source link

`_cap_cup` should never set `_eol` to True` #76

Closed eugulixes closed 7 years ago

eugulixes commented 7 years ago

Such programs like vi may send something like \E[23;80H (set the vertical and horizontal positions of the cursor to y and x). The current implementation of cup will set _eol to True in this case and _echo will write a character on the next line. It's obviously a bug.

dshil commented 7 years ago

@eugulixes, but if the cursor is at the end of a line, where _echo should write a character?

eugulixes commented 7 years ago

@dshil, in my previous example the x and y values start from 1, so echo will put a character at the 80th position and then set _eol to True.