Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
20495:0736d3dc23ba | 20496:747a270eb1db |
---|---|
1476 // Invalid | 1476 // Invalid |
1477 state->scrollregion_top = 0; | 1477 state->scrollregion_top = 0; |
1478 state->scrollregion_bottom = -1; | 1478 state->scrollregion_bottom = -1; |
1479 } | 1479 } |
1480 | 1480 |
1481 // Setting the scrolling region restores the cursor to the home position | |
1482 state->pos.row = 0; | |
1483 state->pos.col = 0; | |
1484 if(state->mode.origin) { | |
1485 state->pos.row += state->scrollregion_top; | |
1486 state->pos.col += SCROLLREGION_LEFT(state); | |
1487 } | |
1488 | |
1481 break; | 1489 break; |
1482 | 1490 |
1483 case 0x73: // DECSLRM - DEC custom | 1491 case 0x73: // DECSLRM - DEC custom |
1484 // Always allow setting these margins, just they won't take effect without DECVSSM | 1492 // Always allow setting these margins, just they won't take effect without DECVSSM |
1485 state->scrollregion_left = CSI_ARG_OR(args[0], 1) - 1; | 1493 state->scrollregion_left = CSI_ARG_OR(args[0], 1) - 1; |
1495 if(state->scrollregion_right > -1 && | 1503 if(state->scrollregion_right > -1 && |
1496 state->scrollregion_right <= state->scrollregion_left) { | 1504 state->scrollregion_right <= state->scrollregion_left) { |
1497 // Invalid | 1505 // Invalid |
1498 state->scrollregion_left = 0; | 1506 state->scrollregion_left = 0; |
1499 state->scrollregion_right = -1; | 1507 state->scrollregion_right = -1; |
1508 } | |
1509 | |
1510 // Setting the scrolling region restores the cursor to the home position | |
1511 state->pos.row = 0; | |
1512 state->pos.col = 0; | |
1513 if(state->mode.origin) { | |
1514 state->pos.row += state->scrollregion_top; | |
1515 state->pos.col += SCROLLREGION_LEFT(state); | |
1500 } | 1516 } |
1501 | 1517 |
1502 break; | 1518 break; |
1503 | 1519 |
1504 case 0x74: | 1520 case 0x74: |
1977 void *vterm_state_get_cbdata(VTermState *state) | 1993 void *vterm_state_get_cbdata(VTermState *state) |
1978 { | 1994 { |
1979 return state->cbdata; | 1995 return state->cbdata; |
1980 } | 1996 } |
1981 | 1997 |
1982 void vterm_state_set_unrecognised_fallbacks(VTermState *state, const VTermParserCallbacks *fallbacks, void *user) | 1998 void vterm_state_set_unrecognised_fallbacks(VTermState *state, const VTermStateFallbacks *fallbacks, void *user) |
1983 { | 1999 { |
1984 if(fallbacks) { | 2000 if(fallbacks) { |
1985 state->fallbacks = fallbacks; | 2001 state->fallbacks = fallbacks; |
1986 state->fbdata = user; | 2002 state->fbdata = user; |
1987 } | 2003 } |