Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

editor: Stabilize IME candidate box position during pre-edit on Wayland (#28429)

Wanten5d0c96872bc3
diff --git a/crates/gpui/src/platform/linux/wayland/window.rs b/crates/gpui/src/platform/linux/wayland/window.rs
index bb0b29df442..3fb8a588fb9 100644
--- a/crates/gpui/src/platform/linux/wayland/window.rs
+++ b/crates/gpui/src/platform/linux/wayland/window.rs
@@ -635,12 +635,8 @@ impl WaylandWindowStatePtr {
let mut bounds: Option<Bounds<Pixels>> = None;
if let Some(mut input_handler) = state.input_handler.take() {
drop(state);
- if let Some(selection) = input_handler.selected_text_range(true) {
- bounds = input_handler.bounds_for_range(if selection.reversed {
- selection.range.start..selection.range.start
- } else {
- selection.range.end..selection.range.end
- });
+ if let Some(selection) = input_handler.marked_text_range() {
+ bounds = input_handler.bounds_for_range(selection.start..selection.start);
}
self.state.borrow_mut().input_handler = Some(input_handler);
}