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

symbol-overlay-jump-first/last does not work #111

Open
andsunds opened this issue Jul 4, 2024 · 0 comments
Open

symbol-overlay-jump-first/last does not work #111

andsunds opened this issue Jul 4, 2024 · 0 comments

Comments

@andsunds
Copy link

andsunds commented Jul 4, 2024

The functions symbol-overlay-jump-first and symbol-overlay-jump-last do not seem to work for me in symbol-overlay-mode.

As far as I can tell this is caused when setting the before variable with (symbol-overlay-get-list -1 symbol) which returns nil, thus rendering the (count (length before)) to zero.

Changing the call to symbol-overlay-get-list to (symbol-overlay-get-list -1) seems to fix the issue. So my temporary work-around is to create the additional functions:

(defun symbol-overlay-mode-jump-first ()
  "Jump to the first location in symbol-overlay-mode."
  (interactive)
  (symbol-overlay-adjust-position)
  (let* ((before (symbol-overlay-get-list -1))
         (count (length before)))
    (symbol-overlay-jump-call #'symbol-overlay-basic-jump (- count))))

(defun symbol-overlay-mode-jump-last ()
  "Jump to the last location in symbol-overlay-mode."
  (interactive)
  (symbol-overlay-adjust-position)
  (let* ((after (symbol-overlay-get-list 1))
         (count (length after)))
    (symbol-overlay-jump-call #'symbol-overlay-basic-jump (- count 1))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant