From 2d3bfc48bfa79cdeb63e64a1c1d8bfab47c5f9f0 Mon Sep 17 00:00:00 2001 From: hyzen Date: Tue, 7 Jul 2026 15:51:31 +0530 Subject: [PATCH] Fix: in v mode, pressing space was broken --- init.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 939f6c6..44d7f82 100644 --- a/init.lua +++ b/init.lua @@ -65,13 +65,12 @@ require('lazy').setup({ config = function(_, opts) local wk = require 'which-key' wk.setup(opts) - -- Patch which-key's getchar so acts as a close key, - -- since is the only hardcoded one and isn't configurable + -- Patch which-key's getchar so acts as a close key, since is the only hardcoded one and isn't configurable local state = require 'which-key.state' local orig_getchar = state.getchar state.getchar = function() local ok, char = orig_getchar() - if ok and char == ' ' then + if ok and char == ' ' and state.state and state.state.show then char = vim.api.nvim_replace_termcodes('', true, false, true) end return ok, char