From 44c3ee0e833348cfad26f9bbcd2d6a10ac5ea4e3 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 29 May 2020 08:27:05 -0700 Subject: [PATCH] wezterm: search: fix cursor position to use grapheme width --- src/frontend/gui/search.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/gui/search.rs b/src/frontend/gui/search.rs index 072000f36..bb077e030 100644 --- a/src/frontend/gui/search.rs +++ b/src/frontend/gui/search.rs @@ -310,7 +310,7 @@ impl Renderable for SearchRenderable { fn get_cursor_position(&self) -> StableCursorPosition { // move to the search box StableCursorPosition { - x: 8 + self.pattern.len(), // FIXME: ucwidth + x: 8 + term::unicode_column_width(&self.pattern), y: self.compute_search_row(), shape: termwiz::surface::CursorShape::SteadyBlock, }