fix: do not cancel completion if the view size changes

Only if the view position changes.
This commit is contained in:
CJ van den Berg 2026-02-04 18:30:02 +01:00
parent e26d86eca3
commit ee6095ecee
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -135,7 +135,8 @@ fn get_query_text(self: *Type, cursor: ed.Cursor, allocator: std.mem.Allocator)
fn maybe_cancel(self: *Type, cursor: Buffer.Cursor) bool {
if (self.value.cursor.row != cursor.row or
self.value.cursor.col > cursor.col or
!self.value.view.eql(self.value.editor.view))
self.value.view.row != self.value.editor.view.row or
self.value.view.col != self.value.editor.view.col)
{
tp.self_pid().send(.{ "cmd", "palette_menu_cancel" }) catch |e| self.logger.err(module_name, e);
return true;