Comments (3)
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.
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.
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)
- Bug: E5108: Error executing lua [string ":lua"]:1: attempt to call field 'set_state' (a nil value) HOT 3
- Bug: Scrollview signs+null-ls causes nvim crash on ":set nu" or ":%s" replace HOT 1
- Issues with Winblend and Transparent Terminal Background HOT 6
- Feature Request: set some sign inside the scrollbars HOT 9
- `winblend` is not respected on hovering signs HOT 2
- Changing `list/nolist` or `listchars` crashes nvim with `trail` sign enabled at startup config HOT 3
- Add support for gitsigns HOT 4
- Pointer position is not adjusted when `winbar` is set HOT 1
- Signs won't go away HOT 4
- Search sign colors HOT 3
- opening a large file with a lot of error slows down nvim HOT 4
- [Question] How to add a horizontal scrollbar ? HOT 2
- nvim-scrollview not seeing diagnostics from coc.nvim HOT 2
- Compatibility with 0.10 extmark sign HOT 2
- Cursor positions changes undeterminably while scrolling past it HOT 4
- Cursor moves to bottom left of window when dragging scrollbar with wrapped lines
- gitsigns spacing and colour HOT 4
- Scrollview hides text at the end of a line HOT 2
- Pasting via the right-click menu inserts junk HOT 2
- Expose the current state in the Lua API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-scrollview.