Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
noahgitsham opened this issue Jun 21, 2023 · 3 comments

Comments

@noahgitsham
Copy link

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!

@Aasim-A
Copy link
Owner

Aasim-A commented Jun 22, 2023

Hi @noahgitsham, glad you find the plugin helpful.

I'll give it a try and see what I can do

@Aasim-A
Copy link
Owner

Aasim-A commented Sep 8, 2023

this should be fixed by #8

@Aasim-A Aasim-A closed this as completed Sep 8, 2023
@noahgitsham
Copy link
Author

Seems to be working perfectly, thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants