branch: master
commit 03222ede416dd8b8ee28a93d8720bd85b7c1612f
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    ivy.el (ivy-occur-delete-candidate): Add and bind to "C-d"
---
 ivy.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ivy.el b/ivy.el
index 2685db6..381a0d8 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3689,9 +3689,16 @@ When `ivy-calling' isn't nil, call `ivy-occur-press'."
 (defvar ivy-occur-grep-mode-map
   (let ((map (copy-keymap ivy-occur-mode-map)))
     (define-key map (kbd "C-x C-q") 'ivy-wgrep-change-to-wgrep-mode)
+    (define-key map (kbd "C-d") 'ivy-occur-delete-candidate)
     map)
   "Keymap for Ivy Occur Grep mode.")
 
+(defun ivy-occur-delete-candidate ()
+  (interactive)
+  (let ((inhibit-read-only t))
+    (delete-region (line-beginning-position)
+                   (1+ (line-end-position)))))
+
 (define-derived-mode ivy-occur-grep-mode grep-mode "Ivy-Occur"
   "Major mode for output from \\[ivy-occur].
 

Reply via email to