From 15cb342e0457a29fe58ffd83fdb99e43a6da1988 Mon Sep 17 00:00:00 2001 From: JetSetIlly Date: Sat, 19 Jul 2025 08:28:06 +0100 Subject: [PATCH 1/2] added ignore_input_utf8_always possible solution for issue #45 --- autoload/scope/popup.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/autoload/scope/popup.vim b/autoload/scope/popup.vim index 16cc605..de1deea 100644 --- a/autoload/scope/popup.vim +++ b/autoload/scope/popup.vim @@ -127,6 +127,12 @@ export class FilterMenu [128, 80, 83], [128, 80, 69], ] + var ignore_input_utf8_always = [ + # these sequences seem to be generated by desktops that switch-from + # or switch-to the workspace on which the vim instance is running + [128, 250], + [128, 251], + ] var ctrl_r_active = false this.idp = popup_create([$'{options.promptchar} '], @@ -229,6 +235,8 @@ export class FilterMenu if ln == getcurpos(id)[1] win_execute(id, "normal! G") endif + elseif ignore_input_utf8_always->index(str2list(key)) == -1 + # do nothing at all with this input type elseif ignore_input->index(key) == -1 && # ignoring double clicks, which are 6 char long: `<80> <80>.` strchars(key) != 6 && From 5b950d0c1319667d5b7f55486f9fb1fde53c1e05 Mon Sep 17 00:00:00 2001 From: JetSetIlly Date: Sat, 19 Jul 2025 08:59:06 +0100 Subject: [PATCH 2/2] corrected ignore_input_utf8_always values and conditions --- autoload/scope/popup.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/scope/popup.vim b/autoload/scope/popup.vim index de1deea..1789822 100644 --- a/autoload/scope/popup.vim +++ b/autoload/scope/popup.vim @@ -130,8 +130,8 @@ export class FilterMenu var ignore_input_utf8_always = [ # these sequences seem to be generated by desktops that switch-from # or switch-to the workspace on which the vim instance is running - [128, 250], - [128, 251], + [128, 70, 66], + [128, 70, 65], ] var ctrl_r_active = false @@ -235,7 +235,7 @@ export class FilterMenu if ln == getcurpos(id)[1] win_execute(id, "normal! G") endif - elseif ignore_input_utf8_always->index(str2list(key)) == -1 + elseif ignore_input_utf8_always->index(str2list(key)) != -1 # do nothing at all with this input type elseif ignore_input->index(key) == -1 && # ignoring double clicks, which are 6 char long: `<80> <80>.`