zed icon indicating copy to clipboard operation
zed copied to clipboard

Keyboard end does not go at the end but at first line end of wrap

Open williamdes opened this issue 1 year ago • 2 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

image

As shown here It should go to the end of the wrap when I hit Fin (End) on my keyboard. Vscode works fine with this behavior. I guess this is an implementation bug.


  "soft_wrap": "preferred_line_length",
  "preferred_line_length": 180,

Environment

Zed: v1.0.0 (Zed Dev a0fa8a489bb4af98059e5a064c7fac2a77b49aff) OS: Debian 12 Memory: 62.4 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

williamdes avatar Apr 23 '24 12:04 williamdes

Hi! I'd like to work on this issue.

tverghis avatar Apr 29 '24 04:04 tverghis

I believe the issue is Editor::move_to_{beginning|end}_of_line always stop at soft-wraps. Should this be made configurable, like it is for Editor::select_to_{beginning|end}_of_line? If so, should the default (if un-configured) retain the existing behavior?

tverghis avatar Apr 29 '24 04:04 tverghis

The keybindings stuff is not that intuitive to edit, but here is how to make this setting work: In: ~/.config/zed/keymap.json

[
  // Bindings from VS Code
  {
    "context": "Editor",
    "bindings": {
      "end":  [
         "editor::MoveToEndOfLine",
         {
           "stop_at_soft_wraps": false
         }
      ],
...

williamdes avatar May 04 '24 09:05 williamdes