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

cells show symbol occurrence highlighting when in command mode #173971

Closed
indirectlylit opened this issue Feb 9, 2023 · 7 comments
Closed

cells show symbol occurrence highlighting when in command mode #173971

indirectlylit opened this issue Feb 9, 2023 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders notebook-cell-editor Bugs related to code editors in Notebooks (not intellisense / LS's) verified Verification succeeded
Milestone

Comments

@indirectlylit
Copy link

indirectlylit commented Feb 9, 2023

Environment data

  • VS Code version: 1.73.1 1.75.0
  • Jupyter Extension version (available under the Extensions sidebar): v2022.9.1303220346
  • Python Extension version (available under the Extensions sidebar): v2022.18.2
  • OS (Windows | Mac | Linux distro) and version: Mac
  • Python and/or Anaconda version: 3.10
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Docker
  • Jupyter server running: Local

Expected behaviour

VS Code provides occurrence highlighting of the symbol currently under the visible cursor. (Enabled by default as setting editor.occurrencesHighlight). This is useful when a cell is in edit mode.

When the cursor is not visible because a cell is in command mode, these highlights are no longer relevant or meaningful and should be hidden with the cursor.

Actual behaviour

Occurrence highlighting persists even in command mode, leading to highlights which confusingly look like find/search results.

Steps to reproduce:

  • Enter some code in a cell
  • Leave the cursor over a symbol
  • Switch to command mode
  • The cursor gets hidden but the highlights persist

2023-02-09 11 55 19

@indirectlylit indirectlylit added the bug Issue identified by VS Code Team member as probable bug label Feb 9, 2023
@rebornix rebornix transferred this issue from microsoft/vscode-jupyter Feb 9, 2023
@rebornix rebornix added the notebook-cell-editor Bugs related to code editors in Notebooks (not intellisense / LS's) label Feb 9, 2023
@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.75.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@indirectlylit
Copy link
Author

indirectlylit commented Feb 9, 2023

Upgraded to 1.75.0 and the issue remains.

@roblourens
Copy link
Member

This has bugged me too, do you know if there is a way to clear these @rebornix ?

@rebornix
Copy link
Member

@roblourens the symbol/word highlight is not cleared when the editor loses focus, which is expected in a normal text editor but not in a cell editor I guess. We need to check if the contrib allows us to clear/hide them and reenable when the editor gains focus. I'll check.

@indirectlylit
Copy link
Author

the symbol/word highlight is not cleared when the editor loses focus, which is expected in a normal text editor but not in a cell editor I guess

For what it's worth, I would personally expect it to be cleared in both cases because the highlights are meaningless without keyboard focus.

@rebornix
Copy link
Member

It makes good sense to me to disable this in notebook. Changing the behavior in Monaco might be breaking. We can see how to expose enable/disable functionalities from the word highlighter contrib.

@rebornix rebornix added this to the March 2023 milestone Feb 17, 2023
@indirectlylit
Copy link
Author

Thank you both.

Jupyter notebooks + VS Code editor is overall a delightful and polished UX – well done.

@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Mar 2, 2023
@andreamah andreamah added the verified Verification succeeded label Mar 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders notebook-cell-editor Bugs related to code editors in Notebooks (not intellisense / LS's) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants