From 2c44abc70001b1184715191ca07068969075f981 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 17 Jan 2022 22:25:43 -0700 Subject: [PATCH] fix naming of get_semantic_prompt_zones It previously had the more generic name of get_semantic_zones which implied that it cached all zones, but this method is scoped only to Prompt zones. --- wezterm-gui/src/termwindow/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wezterm-gui/src/termwindow/mod.rs b/wezterm-gui/src/termwindow/mod.rs index 048cf1aaf..03b30cc26 100644 --- a/wezterm-gui/src/termwindow/mod.rs +++ b/wezterm-gui/src/termwindow/mod.rs @@ -1734,7 +1734,7 @@ impl TermWindow { } /// Returns the Prompt semantic zones - fn get_semantic_zones(&mut self, pane: &Rc) -> &[SemanticZone] { + fn get_semantic_prompt_zones(&mut self, pane: &Rc) -> &[SemanticZone] { let mut cache = self .semantic_zones .entry(pane.pane_id()) @@ -1760,7 +1760,7 @@ impl TermWindow { .get_viewport(pane.pane_id()) .unwrap_or(dims.physical_top); let zone = { - let zones = self.get_semantic_zones(&pane); + let zones = self.get_semantic_prompt_zones(&pane); let idx = match zones.binary_search_by(|zone| zone.start_y.cmp(&position)) { Ok(idx) | Err(idx) => idx, };