jupyter / jupyter/notebook

Notebook: Pressing Home in a multi-line wrapped line (often Markdown) causes cursor to move several lines up

Open
#4,022 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

Jupyter notebook 5.6.0. (I think this is a CodeMirror issue.)

Multiline wrapped strings are common in Markdown. When I press End, the cursor moves to the end of the visual line (as in word processing programs). When I press Home, the cursor moves to the end of the *physical* line, which can be several visual lines up. The unexpected cursor position (which differs from text editors and word processors) interferes with my ability to intuitively edit text in Jupyter markdown environments.

https://github.com/codemirror/CodeMirror/issues/1576#issuecomment-19146595 contains a simple workaround (I haven't tested though).

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior in a Jupyter Markdown cell containing a wrapped multiline line, then compare the Home and End cursor positions with the behavior described in CodeMirror issue 1576. Review the linked workaround first; done means Home places the cursor at the start of the current visual line without moving several visual lines upward.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.