mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-05-02 06:46:32 -04:00
csi: overwrite “saved cursor” position when entering the alt screen
Verified with vttest 11.8.7.3 - XTerm Alternate Screen features
This commit is contained in:
parent
c0a3f89775
commit
b72f7401d5
2 changed files with 14 additions and 0 deletions
|
|
@ -80,6 +80,8 @@
|
|||
(https://codeberg.org/dnkl/foot/issues/291).
|
||||
* Sixel “current geometry” query response not being bounded by the
|
||||
current window dimensions (fixes `lsix` output)
|
||||
* Entering the alt screen did not update the normal screen’s “saved
|
||||
cursor” position.
|
||||
|
||||
|
||||
### Security
|
||||
|
|
|
|||
12
csi.c
12
csi.c
|
|
@ -493,6 +493,18 @@ decset_decrst(struct terminal *term, unsigned param, bool enable)
|
|||
if (enable && term->grid != &term->alt) {
|
||||
selection_cancel(term);
|
||||
|
||||
/*
|
||||
* A ‘cursor restore’ *after* returning from alt screen
|
||||
* should restore the cursor from where it was when
|
||||
* *entering* alt mode.
|
||||
*
|
||||
* I.e. entering alt mode “overwrites” the previous saved
|
||||
* cursor position.
|
||||
*
|
||||
* Checked by vttest 11.8.7.3
|
||||
*/
|
||||
term->grid->saved_cursor = term->grid->cursor;
|
||||
|
||||
term->grid = &term->alt;
|
||||
|
||||
term_cursor_to(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue