zed icon indicating copy to clipboard operation
zed copied to clipboard

Option to disable Scroll Beyond Last Line

Open wzxu opened this issue 1 year ago • 6 comments

Check for existing issues

  • [X] Completed

Describe the feature

VS Code parity. An option to stop the editor from scrolling and showing all the extra empty space when already at the end of file.

image

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

No response

wzxu avatar Mar 12 '23 15:03 wzxu

Wondering if we should offer a simple boolean, like VS Code, or maybe some more fine grained thing, like a float that represents how much over scrolling occurs.

JosephTLyons avatar Mar 13 '23 13:03 JosephTLyons

A bool would suffice for now. This is an absolute need for me as I cannot stand scrolling beyond the last line.

Joker666 avatar Mar 25 '23 09:03 Joker666

I would love to see this option as well

vitormalencar avatar Dec 23 '23 03:12 vitormalencar

I really need this bool option, because I can roll down. I think there is still content below, which is not in line with my habits in VSC and IDEA.

zhuweiyou avatar Feb 15 '24 14:02 zhuweiyou

I really need this bool option, because I can roll down. I think there is still content below, which is not in line with my habits in VSC and IDEA.

Check out the latest release, there is a new option called vertical_scroll_offset

Edit

Oh, this isn't related to this issue. Thought this option would disable this

gopeter avatar Feb 15 '24 14:02 gopeter

A partial workaround with keymap.json if you, like me, are using PageUp and PageDown to scroll:

[
  {
    "context": "Editor",
    "bindings": {
      // Prevent scrolling "off-screen" at the bottom of the file
      "pageup": "editor::MovePageUp",
      "pagedown": "editor::MovePageDown",
    }
  }
]

eproxus avatar Feb 26 '24 14:02 eproxus

+1 for this.

I get that it might be irrational, but I find it super annoying when I scroll down and I just get blank space. 😛

I’d link it to the vertical_scroll_margin so that scrolling down with a mouse/trackpad would stop the same place as doing it with cmd+down.

Here’s an example, where I’ve set the vertical_scroll_margin at 10. 👇🏻 I would want scrolling with the trackpad to stop at the same place. CleanShot 2024-03-17 at 01 42 30@2x

Erlendms avatar Mar 17 '24 00:03 Erlendms

Monitoring this as well. Need this option.

thedocbwarren avatar May 27 '24 20:05 thedocbwarren

I'd be very interested in reading a reason from people who like the last line of code at the top of their editor instead of the bottom because I can't imagine why anyone might like it (unless this is some kind of accessibility thing for people who can't move their eyeballs vertically?).

pekeler avatar May 28 '24 12:05 pekeler

The only utility I've found is when comparing two files side-by-side and you need the last line to be at a certain height in the display... Anyways I'd also like the bool! :D

guillemap avatar May 29 '24 01:05 guillemap