Skip to content

Fix lsp_code_lens command executing last code lens on cancel - #2925

Merged
jwortmann merged 2 commits into
sublimelsp:mainfrom
jwortmann:fix-code-lens-command
May 23, 2026
Merged

jwortmann merged 2 commits into
sublimelsp:mainfrom
jwortmann:fix-code-lens-command

Conversation

@jwortmann

Copy link
Copy Markdown
Member

When Window.show_quick_panel is cancelled with Esc, it returns the index -1 to the callback function. This would accidentally cause the last code lens in the list to be executed, because indexing a list with -1 returns the last list item in Python.

Comment thread plugin/code_lens.py Resolved
@jwortmann
jwortmann merged commit 3f168ab into sublimelsp:main May 23, 2026
8 checks passed
@jwortmann
jwortmann deleted the fix-code-lens-command branch May 23, 2026 13:33
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

Successfully merging this pull request may close these issues.

2 participants