1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2025-10-30 23:36:53 -04:00

Fix saved cursor handling

This resolves several problems with handling of the saved cursor when
switching between primary and alternate screen. Additionally ref-tests
are also added for all common interactions to make sure the behavior
does not regress.

The behavior is based on XTerm's behavior except for interaction with
`reset`. XTerm does not reset the alternate screen's saved cursor on
`reset`, but VTE does. Since a `reset` should reset as much as possible,
Alacritty copies VTE here instead of XTerm.
This commit is contained in:
Christian Duerr 2020-07-06 19:10:06 +00:00 committed by GitHub
parent 72c916ff43
commit 65bff1878f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 28 additions and 9 deletions

View file

@ -0,0 +1,8 @@
[undeadleech@archhq saved_cursor]$ echo -e "\e7 \e(0 test \e8 xxx"
7 (0 test 8 xxx
[undeadleech@archhq saved_cursor]$ echo -e "\e[?1049h \e(0 test \e[?1049l xxx"
[?1049h (0 test [?1049l xxx
[undeadleech@archhq saved_cursor]$ echo -e "\e7 \e(0 \e[?1049h test \e[?1049l \e8 xxx"
7 (0 [?1049h test [?1049l 8 xxx
[undeadleech@archhq saved_cursor]$ exit
exit

View file

@ -0,0 +1 @@
{"history_size":0}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"width":1259.0,"height":683.0,"cell_width":9.0,"cell_height":19.0,"padding_x":4.0,"padding_y":9.0,"dpr":1.1666666666666667}

View file

@ -0,0 +1,4 @@
[undeadleech@archhq saved_cursor_alt]$ echo -e "\e(0\e[10;$(tput cols)H \e[?1049h\e7 \e[?1049l \e(B\e[H \e[?1049h test\e8xxx"
(0 [?1049h7 [?1049l (B [?1049h test8xxx
[undeadleech@archhq saved_cursor_alt]$ exit
exit

View file

@ -0,0 +1 @@
{"history_size":0}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"width":1259.0,"height":683.0,"cell_width":9.0,"cell_height":19.0,"padding_x":4.0,"padding_y":9.0,"dpr":1.1666666666666667}