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
Issue with Python indented structures in JupyterLab #16196
Comments
For reproduction upstream: Playground example |
Dedenting is intentional in the
However, I think that dedent on enter should only move you one block back, not two blocks back. I can reproduce the suboptimal behaviour in CodeMirror playground: And because there is no dedent when typing function definition (indent on input is not implemented for Python for this case): The current implementation is de facto fighting the user who tries to add a method to a class definition (whether they decide to add a new line per convention, or to start writing in the first new line they end up with wrong indentation anyways). I opened an issue upstream to discuss: codemirror/dev#1370 |
Description
Consider the following snippet -
If the cursor is at the end of the last line and enter is pressed twice, the user is sent outside the function definition which is unintuitive. Attaching a gif demonstrating this -
This happens even when defining functions in a class.
Reproduce
Expected behavior
I would expect the behavior to be the same as lab3/vscode.
Context
The text was updated successfully, but these errors were encountered: