s3ed icon indicating copy to clipboard operation
s3ed copied to clipboard

Quitting an s2ed command leaves the minibuffer backspace binding broken

Open glucas opened this issue 1 year ago • 0 comments

The fix for #26 works great as long as you complete the s3ed command. I've found that if you change your mind and quit (C-g), the backspace binding remains and causes an error for other minibuffer commands.

I commented on #27 with a workaround: I am advising the s3ed commands to handle the quit signal:

(defun my/s3ed-quit-handler (orig &rest args)
  (condition-case nil
      (apply orig args)
    (quit (define-key minibuffer-local-map (kbd "<backspace>") nil))))
(advice-add #'s3ed-find-file :around #'my/s3ed-quit-handler)
(advice-add #'s3ed-save-file :around #'my/s3ed-quit-handler)

glucas avatar Sep 14 '23 21:09 glucas