[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master d52c176 351/399: ivy.el (ivy-switch-buffer-kill): Move fro

From: Oleh Krehel
Subject: [elpa] master d52c176 351/399: ivy.el (ivy-switch-buffer-kill): Move from "C-c C-k" to "C-k"
Date: Sat, 20 Jul 2019 14:57:55 -0400 (EDT)

branch: master
commit d52c176e3cca6a6e533e26d577b0aa9ce352d8af
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-switch-buffer-kill): Move from "C-c C-k" to "C-k"
 ivy.el | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/ivy.el b/ivy.el
index 69d0e4d..118d346 100644
--- a/ivy.el
+++ b/ivy.el
@@ -4072,14 +4072,17 @@ BUFFER may be a string or nil."
 (defvar ivy-switch-buffer-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd "C-c C-k") 'ivy-switch-buffer-kill)
+    (define-key map (kbd "C-k") 'ivy-switch-buffer-kill)
 (defun ivy-switch-buffer-kill ()
-  "Kill the current buffer in `ivy-switch-buffer'."
+  "When at end-of-line, kill the current buffer in `ivy-switch-buffer'.
+Otherwise, forward to `ivy-kill-line'."
-  (let ((bn (ivy-state-current ivy-last)))
-    (ivy--kill-buffer-action bn)))
+  (if (not (eolp))
+      (ivy-kill-line)
+    (ivy--kill-buffer-action
+     (ivy-state-current ivy-last))))
@@ -4344,9 +4347,9 @@ This list can be rotated with 
            (delete current (symbol-value ivy--reverse-i-search-symbol)))
-      (ring-remove
-       ivy--reverse-i-search-symbol
-       (ring-member ivy--reverse-i-search-symbol (ivy-state-current 
+        (ring-remove
+         ivy--reverse-i-search-symbol
+         (ring-member ivy--reverse-i-search-symbol (ivy-state-current 
 (defvar ivy-reverse-i-search-map

reply via email to

[Prev in Thread] Current Thread [Next in Thread]