aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Jankowski <daniel.jankowski@rub.de>2023-12-29 17:27:50 +0100
committerDaniel Jankowski <daniel.jankowski@rub.de>2023-12-29 17:27:50 +0100
commit5182f5144bf5988c3dfd3c9752955da912b23e06 (patch)
tree50947d302b2c5156cc150865975b0c013fe50313 /src
parentchore: bump version to v0.11.1 (diff)
downloadsl0pstatus-5182f5144bf5988c3dfd3c9752955da912b23e06.tar.gz
sl0pstatus-5182f5144bf5988c3dfd3c9752955da912b23e06.tar.xz
sl0pstatus-5182f5144bf5988c3dfd3c9752955da912b23e06.zip
fix: slow rendering of command widget
Diffstat (limited to 'src')
-rw-r--r--src/config.rs2
-rw-r--r--src/render.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 194d0d4..4a95d32 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -33,7 +33,7 @@ pub enum UpdateEventMask {
pub fn event_mask_from_widget_name(name: &str) -> u8 {
match name {
- "command" => UpdateEventMask::Command as u8 | UpdateEventMask::Session as u8,
+ "command" => UpdateEventMask::Always as u8,
"datetime" => UpdateEventMask::Always as u8,
"mode" => UpdateEventMask::Mode as u8,
"session" => UpdateEventMask::Session as u8,
diff --git a/src/render.rs b/src/render.rs
index 34aaea5..c407a6a 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -127,7 +127,7 @@ impl FormattedPart {
state: &ZellijState,
) -> String {
let skip_cache = self.cache_mask & UpdateEventMask::Always as u8 != 0;
- if !skip_cache && self.cache_mask & state.cache_mask == 0 {
+ if !skip_cache && self.cache_mask & state.cache_mask == 0 && !self.cache.is_empty() {
return self.cached_content.to_owned();
}