Prevent 'Text is read-only' monopolizing minibuffer (ivy/evil/minibuffer)
This commit is contained in:
parent
b632319796
commit
5d83fe83ca
3 changed files with 23 additions and 5 deletions
19
core/autoload/minibuffer.el
Normal file
19
core/autoload/minibuffer.el
Normal file
|
@ -0,0 +1,19 @@
|
|||
;;; ../core/autoload/minibuffer.el
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-minibuffer-kill-word ()
|
||||
"Kill a word, backwards, but only if the cursor is after
|
||||
`minibuffer-prompt-end', to prevent the 'Text is read-only' warning from
|
||||
monopolizing the minibuffer."
|
||||
(interactive)
|
||||
(when (> (point) (minibuffer-prompt-end))
|
||||
(call-interactively 'backward-kill-word)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-minibuffer-kill-line ()
|
||||
"Kill the entire line, but only if the cursor is after
|
||||
`minibuffer-prompt-end', to prevent the 'Text is read-only' warning from
|
||||
monopolizing the minibuffer."
|
||||
(interactive)
|
||||
(when (> (point) (minibuffer-prompt-end))
|
||||
(call-interactively 'backward-kill-sentence)))
|
Loading…
Add table
Add a link
Reference in a new issue