Open dolorsitatem opened 5 years ago
It seems that the problem is caused by two actions: making a selection or quitting the helm buffer. I noticed that if I switched buffers, the line numbers reset. So, here's a kludge: switch buffers and switch back after selecting or quitting.
(defun my-reset-linum-hack ()
"Hack to reset line numbers by switching to next buffer and switching back."
(progn
(switch-to-buffer (other-buffer (current-buffer) 1))
(switch-to-buffer (other-buffer (current-buffer) 1))))
(add-hook 'helm-after-action-hook 'my-reset-linum-hack)
(add-hook 'helm-quit-hook 'my-reset-linum-hack)
When using relative line numbers, helm-swoop sets all other buffer line numbers to "0". This is on Windows 7 with Emacs 26.1.
Initialize packages:
M-: (package-initialize)
Make some new windows:
C-x 2 C-x 3
Switch to other window, enter some data, toggle relative line numbers:
C-x o
C-x b <RET>
C-u 10 <RET>
M-x linum-relative-mode
Switch to other window and search for text:
C-x o
M-x helm-swoop
C-n
C-n
C-n