Skip to content

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

@andsunds

Description

@andsunds

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))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions