Skip to content

Minor fix(?) for lsp-ui-imenu--visit and lsp-ui-imenu--view #274

@emacksnotes

Description

@emacksnotes

In lsp-ui-imenu--visit and lsp-ui-imenu--view, replace

(goto-char marker)

with

(goto-char (overlay-start marker))

Without the above changes I get the following error

funcall-interactively: Wrong type argument: integer-or-marker-p, #<overlay from 16721 to 16752 in xdisp.c>

Activity

c02y

c02y commented on Sep 11, 2020

@c02y

@emacksnotes Agree, I got the same problem, your code line fixes it.

It's over a year, maybe post a PR?

UPDATE:
I was wrong, the fix-code works only for some simple file such as a source not managed by ccls/lsp, for projects(compile_commands.json), it doesn't work.

Without the fix, In lsp-ui-imenu--visit and lsp-ui-imenu--view works without problem.

jcs090218

jcs090218 commented on Sep 11, 2020

@jcs090218
Member

@emacksnotes @c02y Feel free to open a PR! There will be people reviewing it! 😄

c02y

c02y commented on Sep 11, 2020

@c02y

@jcs090218 I added an update, this fix will break those two functions.

But for a simple source file, lsp-ui-imenu--visit and lsp-ui-imenu--view functions should work too. It still needs update, just not simple (goto-char (overlay-start marker))

linked a pull request that will close this issue on Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @c02y@jcs090218@emacksnotes

      Issue actions

        Minor fix(?) for `lsp-ui-imenu--visit` and `lsp-ui-imenu--view` · Issue #274 · emacs-lsp/lsp-ui