+- The uses of lastcol in state.c are inconsistent, likely a source of bugs.
+- Interestingly despite our goto implementation attempting to remember to
+ update the last and new lines for proper refresh including of the cursor,
+ explicit extra tricks are needed, like in the [A implementation.
- Many operations are the equivalent of newline or scroll if the end of the
scrolling buffer or bottom are reached. Unify those in a function or two as
possible.
/* NOOP */
break;
case 8: /* BS */
+ /* XXX URxvt goes up if 0 but not XTerm */
if (state->cursor_x > 0)
state->cursor_x--;
break;
case 'A': /* Cursor up (cuu) FALLTHROUGH */
if ((i = (state->curparam == -1) ? 1 :
state->csiparam[0]) > 0) {
+ /*
+ * XXX Why is this needed for proper cursor
+ * update when our goto implementation
+ * attempts to do the same?
+ */
+ state_updated(st, state->cursor_y);
if ((state->cursor_y -= i) < 0)
state->cursor_y = 0;
+ state_updated(st, state->cursor_y);
}
state->escstate = 0;
estate_ticks = 0;