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

cursor indent not maintained on a new line #6945

Open
tonyfast opened this issue Jun 23, 2023 · 5 comments
Open

cursor indent not maintained on a new line #6945

tonyfast opened this issue Jun 23, 2023 · 5 comments

Comments

@tonyfast
Copy link
Collaborator

Description

consider some indented code \t\tcode. hitting Enter will create a new line and place the cursor at the beginning of the next line. in classic, the cursor would start with the same offset as the prior line (eg \t\t)

Reproduce

  1. Type an indented line of code in a notebook code cell.
  2. hit Enter
  3. the cursor moves to the next line at offset 0

Expected behavior

the cursor should be placed at the beginning of the last indent offset.

Context

  • Jupyter Notebook version: <!-- Version: 7.0.0rc0
@tonyfast tonyfast added bug status:Needs Triage Applied to issues that need triage labels Jun 23, 2023
@tonyfast
Copy link
Collaborator Author

i should probably rename this later to keyboard inconsistencies. i have some other things to tend to, but...

Ctrl+Left can not be used to navigation to the beginning of a line containing an indent. in classic, ctrl+Left would jump words, it would go to beginning of an indent, then visit the prior line. in the currently version, ctrl+left doesn't visit the beginning of the line and goes directly to the preceeding line.

@tonyfast
Copy link
Collaborator Author

can't tab comment blocks or markdown lists with Tab or Shift+Tab

@JasonWeill
Copy link
Collaborator

I tried reproducing this behavior in JupyterLab 4 (tip of main) and when I start a code cell with \t\tfoo and press ENTER, line 2 starts with one tab indent (not 2, not 0). Not sure whether this is intended behavior or whether I should start with 2 tabs.

@RRosio RRosio added status:Needs Discussion and removed status:Needs Triage Applied to issues that need triage labels Jun 27, 2023
@tonyfast
Copy link
Collaborator Author

i think this was an overall regression in the editor behavior. vscode preserves indents and jupyterlab editors used to, but they don't in v4.

@tonyfast
Copy link
Collaborator Author

it is not possible to type a Tab in an empty string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants