[emacs-w3m:13444] Re: maintain column position in selection pop-up buffer

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.w3m
Organization Emacsen advocacy group
Message-ID <[email protected]>
In [emacs-w3m:13440]
On Thu, 06 Jun 2019 00:47:55 -0400, Boruch Baum wrote:
> Currently, the cursor jumps around when navigating up or down within the
> pop-up. The attached patch should fix that for all cases.

Isn't it enough to fix the issue?
(unnamed) (text/x-patch, 1 KB)
--- w3m.el~	2019-05-28 05:01:41.982806500 +0000
+++ w3m.el	2019-06-07 02:30:05.660728600 +0000
@@ -11400,6 +11400,7 @@
 (defun w3m-select-buffer-show-this-line (&optional interactive-p)
   "Show the buffer on the current menu line or scroll it up."
   (interactive (list t))
+  (save-excursion
   (forward-line 0)
   (let ((obuffer (and (window-live-p w3m-select-buffer-window)
 		      (window-buffer w3m-select-buffer-window)))
@@ -11425,7 +11426,7 @@
 	(w3m-scroll-up-or-next-url nil)))
     (w3m-force-window-update w3m-select-buffer-window)
     (w3m-message w3m-select-buffer-message)
-    buffer))
+    buffer)))
 
 (defun w3m-select-buffer-show-this-line-and-down ()
   "Show the buffer on the current menu line or scroll it down."
@@ -11441,7 +11442,7 @@
 (defun w3m-select-buffer-next-line (&optional n)
   "Move cursor vertically down N lines and show the buffer on the menu."
   (interactive "p")
-  (forward-line n)
+  (next-line n)
   (prog1
       (w3m-select-buffer-show-this-line)
     (w3m-static-when (featurep 'xemacs)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.