Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative numbers in other buffers change to "0" after swoop #135

Open
dolorsitatem opened this issue Nov 26, 2018 · 1 comment
Open

Relative numbers in other buffers change to "0" after swoop #135

dolorsitatem opened this issue Nov 26, 2018 · 1 comment

Comments

@dolorsitatem
Copy link

When using relative line numbers, helm-swoop sets all other buffer line numbers to "0". This is on Windows 7 with Emacs 26.1.

  1. Initialize packages:
    M-: (package-initialize)

  2. Make some new windows:
    C-x 2 C-x 3

  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

  4. Switch to other window and search for text:
    C-x o
    M-x helm-swoop
    C-n
    C-n
    C-n

helm-swoop

@dolorsitatem
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant