Giter Club home page Giter Club logo

scrolleof.nvim's People

Contributors

aasim-a avatar chrisgrieser avatar danielpower avatar stevenxxiu avatar v1nh1shungry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

scrolleof.nvim's Issues

closed folds near the EoF not considered

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.

Does not work with large `scrolloff` values.

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.

Doesn't work properly with wrap setting

If there are lines wrapped, the scrolloff of end of the file will not be equal to the scrolloff in the settings, in some cases there is even no scrolloff.

For example (scrolloff = 5):
1
2
3

Off by one error compared to scrolloff

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.

Screen.Recording.2023-07-14.at.2.27.15.AM.mov

Scroll above first line?

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.

Cursor jumps and gets stuck at bottom of document when scrolling past collapsed fold

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!

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.