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

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

[elpa] externals/ivy-hydra 1bf5b98 234/395: ivy.el: Fix next-error rando


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 1bf5b98 234/395: ivy.el: Fix next-error randomly jumping to previous match
Date: Thu, 25 Feb 2021 08:32:10 -0500 (EST)

branch: externals/ivy-hydra
commit 1bf5b98dc2a01ff4d3255e349cf32817ffaccea1
Author: Martin Renold <martin@log2.ch>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    ivy.el: Fix next-error randomly jumping to previous match
    
    Fixes #2492
    Fixes #2496
    
    Problem happens only when *ivy-occur ...* is not the active window.
    
    Explanation of the problem:
    
https://emacs.stackexchange.com/questions/21464/how-to-persistently-move-the-cursor-in-a-buffer-other-than-the-current-one/21478
---
 ivy.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index 690e446..cdea3c0 100644
--- a/ivy.el
+++ b/ivy.el
@@ -4995,7 +4995,10 @@ When `ivy-calling' isn't nil, call `ivy-occur-press'."
   (setq n (or n 1))
   (let ((ivy-calling t))
     (cond ((< n 0) (ivy-occur-previous-line (- n)))
-          (t (ivy-occur-next-line n)))))
+          (t (ivy-occur-next-line n))))
+  ;; the window's point overrides the buffer's point every time it's 
redisplayed
+  (cl-dolist (window (get-buffer-window-list nil nil t))
+    (set-window-point window (point))))
 
 (define-derived-mode ivy-occur-mode fundamental-mode "Ivy-Occur"
   "Major mode for output from \\[ivy-occur].



reply via email to

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