emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/ztree 67a1d90 11/23: Issue #56: Dont preserve a cursor


From: Stefan Monnier
Subject: [elpa] externals/ztree 67a1d90 11/23: Issue #56: Dont preserve a cursor position on widen/narrow operations
Date: Thu, 17 Dec 2020 23:17:04 -0500 (EST)

branch: externals/ztree
commit 67a1d90595353ab57fd424651c567df9851b9494
Author: Alexey Veretennikov <txm.fourier@gmail.com>
Commit: Alexey Veretennikov <txm.fourier@gmail.com>

    Issue #56: Dont preserve a cursor position on widen/narrow operations
    
    Since the buffer is recreated entirely there is no sense to
    preserve a cursor position.
---
 ztree-view.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ztree-view.el b/ztree-view.el
index 7e0a89a..65eec89 100644
--- a/ztree-view.el
+++ b/ztree-view.el
@@ -677,7 +677,10 @@ Optional argument LINE scroll to the line given."
 This will reuse all other settings for the current ztree buffer, but
 change the root node to the node specified."
   (setq ztree-start-node node
-        ztree-expanded-nodes-list (list ztree-start-node))
+        ztree-expanded-nodes-list (list ztree-start-node)
+        ;; then the new root node is given, no sense to preserve
+        ;; a cursor position
+        ztree-prev-position nil)
   (ztree-refresh-buffer))
 
 



reply via email to

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