fix: fix flakey scroll history (#2935)

* fix: fix flakey scroll history

Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>

* fix: add assertion line

Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>

* Update e2e.yml

* Update e2e.yml

---------

Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
This commit is contained in:
pierce 2023-12-01 01:21:22 +08:00 committed by GitHub
parent f46a516057
commit b221e472ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 59 additions and 59 deletions

View file

@ -1528,7 +1528,9 @@ impl Grid {
if scroll_region_bottom < self.viewport.len() {
self.viewport.remove(scroll_region_bottom);
}
self.viewport.insert(current_line_index, Row::new()); // TODO: .canonical() ?
self.viewport
.insert(current_line_index, Row::new().canonical());
} else if current_line_index > scroll_region_top
&& current_line_index <= scroll_region_bottom
{

View file

@ -1,11 +1,10 @@
---
source: zellij-server/src/panes/./unit/grid_tests.rs
expression: "format!(\"{:?}\", grid)"
---
00 (W):
01 (W): src/terminal_pane/scroll.rs
02 (W): ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
00 (C):
01 (C): src/terminal_pane/scroll.rs
02 (C): ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
03 (C):
04 (C): ────────────────────────────────────────────────┐
05 (C): use crate::terminal_pane::terminal_character::{ │

View file

@ -1,7 +1,6 @@
---
source: zellij-server/src/panes/./unit/grid_tests.rs
expression: "format!(\"{:?}\", grid)"
---
00 (C):
01 (C): 1 [||||||||||||||||||||||||||||||||||||||||||100.0%] Tasks: 79, 382 thr; 1 running
@ -12,7 +11,7 @@ expression: "format!(\"{:?}\", grid)"
06 (C): Swp[ 0K/16.0G]
07 (C):
08 (C): PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
09 (W): 123934 aram 20 0 8444 4384 3364 R 66.7 0.0 0:00.05 htop --delay=100000000000
09 (C): 123934 aram 20 0 8444 4384 3364 R 66.7 0.0 0:00.05 htop --delay=100000000000
10 (C): 1 root 20 0 171M 11616 8608 S 0.0 0.1 0:56.91 /sbin/init
11 (C): 268 root 20 0 93324 34340 33072 S 0.0 0.2 0:01.05 /usr/lib/systemd/systemd-journald
12 (C): 276 root 20 0 32648 10192 7240 S 0.0 0.1 0:01.13 /usr/lib/systemd/systemd-udevd

View file

@ -3,19 +3,19 @@ source: zellij-server/src/panes/./unit/grid_tests.rs
assertion_line: 305
expression: "format!(\"{:?}\", grid)"
---
00 (W): Push <RETURN>
01 (W): Soft scroll down region [12..13] size 2 Line 29
02 (W): Soft scroll down region [12..13] size 2 Line 28
03 (W): Soft scroll down region [12..13] size 2 Line 27
04 (W): Soft scroll down region [12..13] size 2 Line 26
05 (W): Soft scroll down region [12..13] size 2 Line 25
06 (W): Soft scroll down region [12..13] size 2 Line 24
07 (W): Soft scroll down region [12..13] size 2 Line 23
08 (W): Soft scroll down region [12..13] size 2 Line 22
09 (W): Soft scroll down region [12..13] size 2 Line 21
10 (W): Soft scroll down region [12..13] size 2 Line 20
11 (W): Soft scroll down region [12..13] size 2 Line 19
12 (W): Soft scroll down region [12..13] size 2 Line 18
00 (C): Push <RETURN>
01 (C): Soft scroll down region [12..13] size 2 Line 29
02 (C): Soft scroll down region [12..13] size 2 Line 28
03 (C): Soft scroll down region [12..13] size 2 Line 27
04 (C): Soft scroll down region [12..13] size 2 Line 26
05 (C): Soft scroll down region [12..13] size 2 Line 25
06 (C): Soft scroll down region [12..13] size 2 Line 24
07 (C): Soft scroll down region [12..13] size 2 Line 23
08 (C): Soft scroll down region [12..13] size 2 Line 22
09 (C): Soft scroll down region [12..13] size 2 Line 21
10 (C): Soft scroll down region [12..13] size 2 Line 20
11 (C): Soft scroll down region [12..13] size 2 Line 19
12 (C): Soft scroll down region [12..13] size 2 Line 18
13 (C): Soft scroll down region [12..13] size 2 Line 17
14 (C): Soft scroll down region [12..13] size 2 Line 16
15 (C): Soft scroll down region [12..13] size 2 Line 15

View file

@ -3,19 +3,19 @@ source: zellij-server/src/panes/./unit/grid_tests.rs
assertion_line: 327
expression: "format!(\"{:?}\", grid)"
---
00 (W): Push <RETURN>
01 (W): Soft scroll down region [1..24] size 24 Line 29
02 (W): Soft scroll down region [1..24] size 24 Line 28
03 (W): Soft scroll down region [1..24] size 24 Line 27
04 (W): Soft scroll down region [1..24] size 24 Line 26
05 (W): Soft scroll down region [1..24] size 24 Line 25
06 (W): Soft scroll down region [1..24] size 24 Line 24
07 (W): Soft scroll down region [1..24] size 24 Line 23
08 (W): Soft scroll down region [1..24] size 24 Line 22
09 (W): Soft scroll down region [1..24] size 24 Line 21
10 (W): Soft scroll down region [1..24] size 24 Line 20
11 (W): Soft scroll down region [1..24] size 24 Line 19
12 (W): Soft scroll down region [1..24] size 24 Line 18
00 (C): Push <RETURN>
01 (C): Soft scroll down region [1..24] size 24 Line 29
02 (C): Soft scroll down region [1..24] size 24 Line 28
03 (C): Soft scroll down region [1..24] size 24 Line 27
04 (C): Soft scroll down region [1..24] size 24 Line 26
05 (C): Soft scroll down region [1..24] size 24 Line 25
06 (C): Soft scroll down region [1..24] size 24 Line 24
07 (C): Soft scroll down region [1..24] size 24 Line 23
08 (C): Soft scroll down region [1..24] size 24 Line 22
09 (C): Soft scroll down region [1..24] size 24 Line 21
10 (C): Soft scroll down region [1..24] size 24 Line 20
11 (C): Soft scroll down region [1..24] size 24 Line 19
12 (C): Soft scroll down region [1..24] size 24 Line 18
13 (C): Soft scroll down region [1..24] size 24 Line 17
14 (C): Soft scroll down region [1..24] size 24 Line 16
15 (C): Soft scroll down region [1..24] size 24 Line 15

View file

@ -3,19 +3,19 @@ source: zellij-server/src/panes/./unit/grid_tests.rs
assertion_line: 349
expression: "format!(\"{:?}\", grid)"
---
00 (W): Push <RETURN>
01 (W): Jump scroll down region [12..13] size 2 Line 29
02 (W): Jump scroll down region [12..13] size 2 Line 28
03 (W): Jump scroll down region [12..13] size 2 Line 27
04 (W): Jump scroll down region [12..13] size 2 Line 26
05 (W): Jump scroll down region [12..13] size 2 Line 25
06 (W): Jump scroll down region [12..13] size 2 Line 24
07 (W): Jump scroll down region [12..13] size 2 Line 23
08 (W): Jump scroll down region [12..13] size 2 Line 22
09 (W): Jump scroll down region [12..13] size 2 Line 21
10 (W): Jump scroll down region [12..13] size 2 Line 20
11 (W): Jump scroll down region [12..13] size 2 Line 19
12 (W): Jump scroll down region [12..13] size 2 Line 18
00 (C): Push <RETURN>
01 (C): Jump scroll down region [12..13] size 2 Line 29
02 (C): Jump scroll down region [12..13] size 2 Line 28
03 (C): Jump scroll down region [12..13] size 2 Line 27
04 (C): Jump scroll down region [12..13] size 2 Line 26
05 (C): Jump scroll down region [12..13] size 2 Line 25
06 (C): Jump scroll down region [12..13] size 2 Line 24
07 (C): Jump scroll down region [12..13] size 2 Line 23
08 (C): Jump scroll down region [12..13] size 2 Line 22
09 (C): Jump scroll down region [12..13] size 2 Line 21
10 (C): Jump scroll down region [12..13] size 2 Line 20
11 (C): Jump scroll down region [12..13] size 2 Line 19
12 (C): Jump scroll down region [12..13] size 2 Line 18
13 (C): Jump scroll down region [12..13] size 2 Line 17
14 (C): Jump scroll down region [12..13] size 2 Line 16
15 (C): Jump scroll down region [12..13] size 2 Line 15

View file

@ -3,19 +3,19 @@ source: zellij-server/src/panes/./unit/grid_tests.rs
assertion_line: 371
expression: "format!(\"{:?}\", grid)"
---
00 (W): Push <RETURN>
01 (W): Jump scroll down region [1..24] size 24 Line 29
02 (W): Jump scroll down region [1..24] size 24 Line 28
03 (W): Jump scroll down region [1..24] size 24 Line 27
04 (W): Jump scroll down region [1..24] size 24 Line 26
05 (W): Jump scroll down region [1..24] size 24 Line 25
06 (W): Jump scroll down region [1..24] size 24 Line 24
07 (W): Jump scroll down region [1..24] size 24 Line 23
08 (W): Jump scroll down region [1..24] size 24 Line 22
09 (W): Jump scroll down region [1..24] size 24 Line 21
10 (W): Jump scroll down region [1..24] size 24 Line 20
11 (W): Jump scroll down region [1..24] size 24 Line 19
12 (W): Jump scroll down region [1..24] size 24 Line 18
00 (C): Push <RETURN>
01 (C): Jump scroll down region [1..24] size 24 Line 29
02 (C): Jump scroll down region [1..24] size 24 Line 28
03 (C): Jump scroll down region [1..24] size 24 Line 27
04 (C): Jump scroll down region [1..24] size 24 Line 26
05 (C): Jump scroll down region [1..24] size 24 Line 25
06 (C): Jump scroll down region [1..24] size 24 Line 24
07 (C): Jump scroll down region [1..24] size 24 Line 23
08 (C): Jump scroll down region [1..24] size 24 Line 22
09 (C): Jump scroll down region [1..24] size 24 Line 21
10 (C): Jump scroll down region [1..24] size 24 Line 20
11 (C): Jump scroll down region [1..24] size 24 Line 19
12 (C): Jump scroll down region [1..24] size 24 Line 18
13 (C): Jump scroll down region [1..24] size 24 Line 17
14 (C): Jump scroll down region [1..24] size 24 Line 16
15 (C): Jump scroll down region [1..24] size 24 Line 15