cocalc icon indicating copy to clipboard operation
cocalc copied to clipboard

Home and End should operate on displayed lines

Open novoselt opened this issue 6 months ago • 3 comments

Describe the bug A the moment Home/End operate on file lines/paragraphs.

To Reproduce Steps to reproduce the behavior:

  1. In an editor, e.g. Markdown, create a long line that gets wrapped, i.e. one "file line" gets broken into multiple "displayed lines".
  2. Press Home or End button while you are somewhere in that block of text.
  3. The cursor will go to the beginning/end of the file line!

Expected behavior I have never seen such a behaviour in any other editor. JupyterLab and VS Code launched from CoCalc operate on displayed lines (although VS Code has wrapping off by default, eliminating the chance of this problem).

This is of little consequence for editing code, which should have short enough lines to be readable. But when one writes plain prose, file lines correspond to paragraphs and can be quite long, so it makes little sense to jump to their start/end instead of start/end of the line that I see as being edited in front of me.

novoselt avatar Jul 28 '24 19:07 novoselt