aasim-a / scrolleof.nvim Goto Github PK
View Code? Open in Web Editor NEWScroll past the end of file just like scrolloff option
License: MIT License
Scroll past the end of file just like scrolloff option
License: MIT License
Hi, I was wondering if this could have an ignore for terminal buffers.
When you have input_mode enabled in the plugin setup() function, and create new lines at the bottom of a file so that the function scrolls down to them, the plugin starts typing numbers infinitely (see video)
Thanks for the plugin!
So it seems that calculating the distance of the cursor to the end of the file, this plugin just uses the lne number count. However, when you have a closed fold near the end of the file, this distorts the calculation; even though the viewport is close to the EoF, the line the cursor is on can still be quite far away.
For example, setting scrolloff
to 999 makes this plugin not work at all.
With a window height of ~30 rows/lines, having a scrolloff of 16+ starts causing problems already: the EOF scrolloff kicks in only after there are scrolloff
number of lines above the cursor.
Can I disable this plugin in some filetype like 'terminal'?
I wonder if it's possible to only enable this plugin in plain views and disable in all floating windows, and how.
Thank you for this plugin. It makes Copilot much more helpful, as virtual text can be seen on lines beyond EOF.
I've noticed a minor issue where the number of lines below the cursor at EOF is one less than the number of lines below the cursor elsewhere in the file. Attached is a video in which I move the cursor down one line at a time. You'll notice that when moving from line 84 to line 85, instead of the view shifting, the cursor moves down, leaving only 9 lines below the cursor instead of 10.
Would it be possible to add support for scrolling above the first line? This is so if the winbar obscures the first line of code you can scroll upwards to see it.
When I try to move the cursor past a certain closed fold, my cursor jumps straight to the bottom of the file, and keeps jumping back when I try to scroll back up.
I haven't been able to test this thoroughly, however in my case, this only happened when the pane was split like so:
+-+
|A|<- Pane I scroll in
+-+
|B|
+-+
Here is the file that caused the issue:
<!DOCTYPE html>
<html lang="en">
<head>
<title>test</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<div id=left>
</div>
<div id=page>
hello
<p>
Sollicitudin dolor euismod fermentum felis aliquet aliquet dolor. Dapibus pretium consectetur vulputate cursus malesuada torquent; odio sodales semper montes condimentum orci. Purus pellentesque natoque curae; lorem ac potenti at? Justo, pellentesque proin tristique hendrerit primis turpis dictumst. Cursus convallis est praesent? Class habitasse natoque tristique mauris massa molestie, tincidunt tortor iaculis. Porttitor mi tempor purus. Arcu vivamus purus.
</p>
<p>
Semper suscipit accumsan, litora pulvinar! Himenaeos gravida congue purus netus; torquent euismod lacinia dignissim turpis facilisi. Mauris non nibh condimentum, eu netus quam sit sollicitudin a quam orci. Volutpat egestas per maecenas elementum sagittis massa phasellus litora inceptos parturient tempor class. Volutpat pretium cum in senectus laoreet ridiculus vulputate semper eget primis. Odio cursus aliquet ultricies cubilia ut taciti.
</p>
<p>
Tempus felis ullamcorper libero gravida semper sed conubia class natoque per montes lectus. Feugiat commodo gravida nam etiam blandit ultrices cubilia maecenas leo. Metus interdum elit consequat fames fermentum. Mus consequat sapien quis auctor platea sociis mus enim tellus lectus euismod. Consectetur donec nunc fames rutrum. Morbi ridiculus dignissim proin pharetra volutpat pretium consectetur. Ante lorem ornare malesuada suscipit conubia placerat tortor tellus quisque semper. Sem per pellentesque vivamus maecenas purus. Congue magna dolor luctus.
</p>
<p>
Accumsan, sapien facilisis et nostra ad magnis. Tortor non, tincidunt purus lobortis fames fringilla. Per ac risus non lorem enim. Faucibus felis tempus taciti. Lacinia tempor donec congue himenaeos quis lacus aptent semper nullam sociis hendrerit. Iaculis etiam duis netus habitasse amet convallis tellus. Vivamus mus integer tellus metus sollicitudin dictum. Mi hendrerit dictum vivamus consequat. Interdum elementum ornare himenaeos vestibulum curae; sollicitudin augue cum fusce tincidunt lectus placerat. Quam et cursus nascetur pellentesque mattis non varius quis eu pretium per viverra. Quam venenatis netus torquent tristique mauris etiam lacinia tristique nullam odio facilisi aenean.
</p>
<p>
Metus, sodales erat per. Hac nibh risus conubia odio semper torquent scelerisque lacinia. Convallis vulputate feugiat lobortis. Sollicitudin pretium at cum eros pellentesque molestie aliquet lectus sapien. Fusce placerat ornare, urna vulputate commodo. Montes nulla odio at etiam ac convallis aptent cubilia. Dictum ante mollis mi at commodo phasellus nascetur, tempus iaculis facilisi arcu. Ac pretium nam odio phasellus aenean. Nec libero adipiscing diam torquent. Vel torquent dignissim nunc. Augue dapibus lacinia consectetur magna. Phasellus phasellus placerat porttitor imperdiet sed aliquam non tempus. Aliquet phasellus parturient nec ad eleifend laoreet aenean cras lacus placerat in. Potenti.
</p>
<p>
Dictum conubia eget tristique primis interdum nisi sollicitudin rhoncus! Sapien pellentesque commodo facilisi elementum eleifend, quis urna sed ultricies convallis nostra. Massa mauris sem interdum penatibus habitant pellentesque phasellus suspendisse felis scelerisque rutrum nisi! Lobortis adipiscing non tempor ut dapibus libero fames mollis. Placerat dictumst in dui commodo lorem conubia commodo tristique commodo? Ac nunc vehicula himenaeos aptent elementum placerat sit eu arcu pretium urna. Convallis aliquet urna montes ad vel tempor eget eros venenatis justo sem. Diam congue mollis himenaeos phasellus magna adipiscing platea aptent facilisi tortor. Tempus est curae;!
</p>
</div>
</body>
</html>
I used :set foldmethod=indent
and the issue occurs when trying to move past the folded body tag, or expanding that and moving past the page div.
This makes me think it happens when the contents of the fold extends below the bottom of the window when expanded.
Thanks for the great little plugin by the way, hope we can get this fixed!
How to reproduce :
is it actual behavior i can't use mouse whell especially mouse whell up properly with this plugin?
anyway thanks for the plugin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.