Skip to content

Commit 04d0b7d

Browse files
committed
Quit resize mode only by pressing "q", "Q", or space
1 parent 8c79889 commit 04d0b7d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

resize-window.el

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,19 @@ to resize right."
259259
;; with t and that method can worry about how to get that
260260
;; action
261261
(resize-window--execute-action capital t))
262-
(t
262+
(;; NOTE: Don't use `=', if `char' is a symbol like
263+
;; 'insertchar it will fail. Use `equal' instead.
264+
(or (equal char ?q)
265+
(equal char ?Q)
266+
(equal char (string-to-char " ")))
263267
(setq reading-characters nil)
264268
(resize-window--display-menu 'kill)
265-
(resize-window--remove-backgrounds))))))
269+
(resize-window--remove-backgrounds))
270+
(t
271+
(resize-window--notify
272+
(format
273+
"Unregistered key: (%s) %s"
274+
char (single-key-description char))))))))
266275
(quit
267276
(resize-window--display-menu 'kill)
268277
(resize-window--remove-backgrounds))))

0 commit comments

Comments
 (0)