fix(rendering): do not render cursor if there's nothign to render

This commit is contained in:
Aram Drevekenin 2024-06-21 12:42:57 +02:00
parent 91cf593836
commit 32577d01a4
6 changed files with 36 additions and 77 deletions

View File

@ -1817,7 +1817,6 @@ impl Tab {
for key in parse_keys(&adjusted_input) {
plugin_updates.push((Some(pid), client_id, Event::Key(key)));
}
log::info!("plugin_updates: {:?}", plugin_updates);
self.senders
.send_to_plugin(PluginInstruction::Update(plugin_updates))
.with_context(err_context)?;
@ -2001,8 +2000,8 @@ impl Tab {
.with_context(err_context)?;
}
self.render_cursor(output);
if output.has_rendered_assets() {
self.render_cursor(output);
self.hide_cursor_and_clear_display_as_needed(output);
}

View File

@ -1,25 +1,25 @@
---
source: zellij-server/src/./unit/screen_tests.rs
assertion_line: 3171
assertion_line: 3501
expression: "format!(\"{}\", snapshot)"
---
00 (C): ┌ tiled_pane ──────────────────────────────────────────────────────────────────┐
00 (C): ┌ Pane #1 ─────────────────────────────────────────────────────────────────────┐
01 (C): │ │
02 (C): │ │
03 (C): │ │
04 (C): │ │
05 (C): │ ┌ file:/path/to/fake/plugin ───────────┐
06 (C): │ │Loading file:/path/to/fake/plugin │
07 (C): │ │ │
08 (C): │ │ │
09 (C): │ │ │
10 (C): │ │ │
11 (C): │ │ │
12 (C): │ │ │
13 (C): │ │ │
14 (C): │ └──────────────────────────────────────┘
15 (C): │
16 (C): │
05 (C): │
06 (C): │
07 (C): │ ┌ file:/path/to/fake/plugin ───────────┐
08 (C): │ │Loading file:/path/to/fake/plugin │
09 (C): │ │ │ │
10 (C): │ │ │ │
11 (C): │ │ │ │
12 (C): │ │ │ │
13 (C): │ │ │ │
14 (C): │ │ │
15 (C): │ │ │
16 (C): │ └──────────────────────────────────────┘
17 (C): │ │
18 (C): │ │
19 (C): └──────────────────────────────────────────────────────────────────────────────┘

View File

@ -1,25 +1,25 @@
---
source: zellij-server/src/./unit/screen_tests.rs
assertion_line: 3171
assertion_line: 3501
expression: "format!(\"{}\", snapshot)"
---
00 (C): ┌ Pane #1 ─────────────────────────────────────────────────────────────────────┐
00 (C): ┌ tiled_pane ──────────────────────────────────────────────────────────────────┐
01 (C): │ │
02 (C): │ │
03 (C): │ │
04 (C): │ │
05 (C): │ │
06 (C): │ │
07 (C): │ ┌ file:/path/to/fake/plugin ───────────┐
08 (C): │ │Loading file:/path/to/fake/plugin │
09 (C): │ │ │
10 (C): │ │ │
11 (C): │ │ │
12 (C): │ │ │
13 (C): │ │ │
14 (C): │ │ │
15 (C): │ │ │
16 (C): │ └──────────────────────────────────────┘
07 (C): │
08 (C): │
09 (C): │
10 (C): │
11 (C): │
12 (C): │
13 (C): │
14 (C): │
15 (C): │
16 (C): │
17 (C): │ │
18 (C): │ │
19 (C): └──────────────────────────────────────────────────────────────────────────────┘

View File

@ -1,26 +1,6 @@
---
source: zellij-server/src/./unit/screen_tests.rs
assertion_line: 2986
expression: "format!(\"{}\", snapshot)"
assertion_line: 3503
expression: "format!(\"{}\", snapshot_count)"
---
00 (C): ┌ tiled_pane ──────────────────────────────────────────────────────────────────┐
01 (C): │ │
02 (C): │ │
03 (C): │ │
04 (C): │ │
05 (C): │ │
06 (C): │ │
07 (C): │ │
08 (C): │ │
09 (C): │ │
10 (C): │ │
11 (C): │ │
12 (C): │ │
13 (C): │ │
14 (C): │ │
15 (C): │ │
16 (C): │ │
17 (C): │ │
18 (C): │ │
19 (C): └──────────────────────────────────────────────────────────────────────────────┘
4

View File

@ -1,10 +1,10 @@
---
source: zellij-server/src/./unit/screen_tests.rs
assertion_line: 3097
assertion_line: 3428
expression: "format!(\"{}\", snapshot)"
---
00 (C): ┌ plugin_pane_to_break_free ───────────────────────────────────────────────────┐
01 (C): │Loading file:/path/to/fake/plugin
00 (C): ┌ pane_to_stay ────────────────────────────────────────────────────────────────┐
01 (C): │
02 (C): │ │
03 (C): │ │
04 (C): │ │

View File

@ -1,26 +1,6 @@
---
source: zellij-server/src/./unit/screen_tests.rs
assertion_line: 2914
expression: "format!(\"{}\", snapshot)"
assertion_line: 3430
expression: "format!(\"{}\", snapshot_count)"
---
00 (C): ┌ pane_to_stay ────────────────────────────────────────────────────────────────┐
01 (C): │ │
02 (C): │ │
03 (C): │ │
04 (C): │ │
05 (C): │ │
06 (C): │ │
07 (C): │ │
08 (C): │ │
09 (C): │ │
10 (C): │ │
11 (C): │ │
12 (C): │ │
13 (C): │ │
14 (C): │ │
15 (C): │ │
16 (C): │ │
17 (C): │ │
18 (C): │ │
19 (C): └──────────────────────────────────────────────────────────────────────────────┘
4