uli / basicengine-firmware

BASIC Engine Firmware
78 stars 16 forks source link

command loop newline() handling is off #30

Closed konimaru closed 4 years ago

konimaru commented 4 years ago

sc0.edit() returns delta(startline, endline) +2 which is what the number of issued newlines is based on. However, for a multi-line entry the cursor position is important as well.

Consider a multiline text entry. With the cursor positioned in the first line the OK/error response is located right beneath the line (as expected). Moving the cursor down will also move the response (when it shouldn't).

Pressing Enter with cursor in 3rd line (current behaviour):

screen_0001

Pressing Enter with cursor in 3rd line (expected behaviour):

screen_0000