emacs-diffs
[Top][All Lists]
Advanced

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

emacs-28 ace4ce1: * lisp/tab-bar.el (tab-bar-mouse-move-tab): Don't drag


From: Juri Linkov
Subject: emacs-28 ace4ce1: * lisp/tab-bar.el (tab-bar-mouse-move-tab): Don't drag tab to itself.
Date: Sun, 17 Oct 2021 14:03:46 -0400 (EDT)

branch: emacs-28
commit ace4ce16a3b393a4f670efe4603966ef93b4eb63
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/tab-bar.el (tab-bar-mouse-move-tab): Don't drag tab to itself.
---
 lisp/tab-bar.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 76a217c..fe34722 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -362,8 +362,9 @@ at the mouse-down event to the position at mouse-up event."
         (to (tab-bar--key-to-number
              (nth 0 (tab-bar--event-to-item
                      (event-end event))))))
-    (unless (or (eq from t) (eq to t))
-      (tab-bar-move-tab-to to from))))
+    (unless (or (eq from to) (eq from t) (eq to t))
+      (tab-bar-move-tab-to
+       (if (null to) (1+ (tab-bar--current-tab-index)) to) from))))
 
 (defvar tab-bar-map
   (let ((map (make-sparse-keymap)))



reply via email to

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