Coder Social home page Coder Social logo

Comments (3)

dstein64 avatar dstein64 commented on September 21, 2024 1

Thanks for the ideas @DanielCardonaRojas and @Asheq.

@DanielCardonaRojas, the functionality you proposed is now offered as an experimental feature. It can be enabled by setting g:scrollview_include_end_region to v:true.

@Asheq, the behavior you proposed is now the default. Scrollbars will overflow past the bottom of the window when showing the end region, after the last line, of a buffer. I was initially not able to reproduce the Emacs functionality you showed in the video (I tried on Ubuntu). When I tried on Mac and Windows, I could see the scrollbar overflow, as you showed. The behavior I implemented matches Emacs on Mac, where it's also possible to reach that state by dragging the scrollbar with the mouse. That was not possible on Emacs on Windows.

The updates were implemented in #95.

from nvim-scrollview.

Asheq avatar Asheq commented on September 21, 2024

My idea for handling scrolling past the end of the buffer:

Keep it the way it is now, but when the user starts to scroll past the end of the buffer, the scrollbar starts "sinking" down below the visible part of the track.

Please see how https://github.com/gcavallanti/vim-noscrollbar does this:

Screen.Recording.2022-04-28.at.12.32.52.PM.mov

In this video the horizontal scrollbar in the status line is from vim-noscrollbar (the vertical one is nvim-scrollview). Notice how once I scroll past the end of the buffer, the scrollbar "disappears" into the right. This makes sense in my head because the scrollbar represent the region of the buffer that is visible in the window. As I scroll past the end, the visible region shrinks, and so does the scrollbar.

Emacs does the same thing. Watch the scrollbar as I scroll past the end of the buffer:

Screen.Recording.2022-04-29.at.9.30.34.AM.mov

from nvim-scrollview.

Asheq avatar Asheq commented on September 21, 2024

BTW, @dstein64 this plugin is by far the best vim scrollbar plugin I've found! Really glad I found it, and thanks for the incredible work.

(I like being able to place the scrollbar on the left, since it's more within my peripheral vision)

from nvim-scrollview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.