From 7518bd9314809cb20157b3412630b5ad527cce55 Mon Sep 17 00:00:00 2001 From: DogLooksGood Date: Fri, 5 Apr 2024 14:37:46 +0800 Subject: [PATCH] Fix SPC SPC in motion state --- meow-util.el | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/meow-util.el b/meow-util.el index b92e3c5..76c3a3a 100644 --- a/meow-util.el +++ b/meow-util.el @@ -473,13 +473,18 @@ to use the status buffer's original `k' binding at point." (local-set-key (kbd rebind-key) (lambda () (interactive) - (call-interactively - ;; Local maps are those local to the buffer - ;; or a region of the buffer. - (if-let ((local (lookup-key (current-local-map) key))) - (or (command-remapping local) - local) - cmd)))))))))) + ;; Local maps are those local to the buffer + ;; or a region of the buffer. + (let* ((local (lookup-key (current-local-map) key)) + (remapped (command-remapping local))) + (call-interactively + (cond + ((commandp remapped) + remapped) + ((commandp local) + local) + (t + cmd)))))))))))) (defun meow--prepare-region-for-kill () (when (and (equal 'line (cdr (meow--selection-type)))