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

Change cell language fires change event #98836

Closed
DonJayamanne opened this issue May 29, 2020 · 6 comments
Closed

Change cell language fires change event #98836

DonJayamanne opened this issue May 29, 2020 · 6 comments
Assignees
Labels
api bug Issue identified by VS Code Team member as probable bug notebook verified Verification succeeded
Milestone

Comments

@DonJayamanne
Copy link
Contributor

Version: 1.46.0-insider

  • Commit: cd41dd1
  • Date: 2020-05-29T05:45:24.735Z
  • Electron: 7.3.0
  • Chrome: 78.0.3904.130
  • Node.js: 12.8.1
  • V8: 7.8.279.23-electron.0
  • OS: Darwin x64 19.5.0

Steps to Reproduce:

1.Open a notebook
2.Create a markdown cell and change the language to markdown.

A notebook event if fires for change of cell language even though the current language is already the same.

I would not expect the event to get fired if the cell language is the same.
Also as a side effect the cell output change event also gets fired (feels this is a noop change, hence events shouldn't get fired)

Does this issue occur when all extensions are disabled?: Yes/No

@rebornix

@vscodebot
Copy link

vscodebot bot commented May 29, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@rebornix rebornix added notebook api bug Issue identified by VS Code Team member as probable bug labels Jun 2, 2020
@rebornix rebornix added this to the June 2020 milestone Jun 12, 2020
@RMacfarlane RMacfarlane added the verified Verification succeeded label Jul 2, 2020
@RMacfarlane
Copy link
Contributor

I'm trying to use a vscode.notebook.onDidChangeCellLanguage listener, but this seems to never be called now, even if I do change a cell to a different language.

vscode.notebook.onDidChangeNotebookCells does get fired when the language is changed.

@RMacfarlane RMacfarlane reopened this Jul 2, 2020
@RMacfarlane RMacfarlane added verification-found Issue verification failed and removed verified Verification succeeded labels Jul 2, 2020
@rebornix
Copy link
Member

rebornix commented Jul 6, 2020

@RMacfarlane did you switch only between Markdown and GitHub Issue Notebook, if so it's expected as switching between markdown and code cells is a cellsChange event but not a language change event.

@RMacfarlane
Copy link
Contributor

Ah, yes, that is what I did. How do I change to a language outside of those?

@rebornix
Copy link
Member

rebornix commented Jul 6, 2020

@RMacfarlane you can try

@rebornix rebornix removed the verification-found Issue verification failed label Jul 6, 2020
@RMacfarlane RMacfarlane added the verified Verification succeeded label Jul 6, 2020
@RMacfarlane
Copy link
Contributor

Thanks, that worked!

@rebornix rebornix closed this as completed Jul 6, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api bug Issue identified by VS Code Team member as probable bug notebook verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@roblourens @rebornix @DonJayamanne @RMacfarlane and others