Mercurial > vim
diff src/libvterm/src/state.c @ 20496:747a270eb1db v8.2.0802
patch 8.2.0802: libvterm code lags behind the upstream version
Commit: https://github.com/vim/vim/commit/d863728913801c8fa6d633f6580edfcada533fd0
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 20 18:41:41 2020 +0200
patch 8.2.0802: libvterm code lags behind the upstream version
Problem: Libvterm code lags behind the upstream version.
Solution: Include revisions 759 - 762.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 20 May 2020 18:45:04 +0200 |
parents | 1ee7baa5173b |
children | 03826c672315 |
line wrap: on
line diff
--- a/src/libvterm/src/state.c +++ b/src/libvterm/src/state.c @@ -1478,6 +1478,14 @@ static int on_csi(const char *leader, co state->scrollregion_bottom = -1; } + // Setting the scrolling region restores the cursor to the home position + state->pos.row = 0; + state->pos.col = 0; + if(state->mode.origin) { + state->pos.row += state->scrollregion_top; + state->pos.col += SCROLLREGION_LEFT(state); + } + break; case 0x73: // DECSLRM - DEC custom @@ -1499,6 +1507,14 @@ static int on_csi(const char *leader, co state->scrollregion_right = -1; } + // Setting the scrolling region restores the cursor to the home position + state->pos.row = 0; + state->pos.col = 0; + if(state->mode.origin) { + state->pos.row += state->scrollregion_top; + state->pos.col += SCROLLREGION_LEFT(state); + } + break; case 0x74: @@ -1979,7 +1995,7 @@ void *vterm_state_get_cbdata(VTermState return state->cbdata; } -void vterm_state_set_unrecognised_fallbacks(VTermState *state, const VTermParserCallbacks *fallbacks, void *user) +void vterm_state_set_unrecognised_fallbacks(VTermState *state, const VTermStateFallbacks *fallbacks, void *user) { if(fallbacks) { state->fallbacks = fallbacks;