question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Moving the cursor to somewhere outside of the viewport should center the cursor vertically

See original GitHub issue

Describe the bug A couple of examples of the situation described in the title:

  • When jumping to a mark outside of the viewport, the cursor line is placed at either the first or second from last line in the viewport.
  • When searching for a string with / and the next occurrence is outside of the viewport, the cursor line is placed at either the first or second from last line in the viewport.

To Reproduce Steps to reproduce the behavior:

  1. Set a mark at line x in a file with ma.
  2. Navigate to another part of the file such that the line x is outside of the viewport.
  3. Jump to the mark with 'a.

Expected behavior The cursor line x should be vertically centered.

Screenshots marks

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 0.16.0
  • VSCode version: 1.25.1
  • OS: Windows 10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
pnalchajiancommented, Mar 1, 2020

The above commit (4434) seems to behave unexpectedly around heavily folded code. If I’m traversing lines (simple cursor movements like jk) in a non-folded section of code, the cursor works just fine. When I’m doing the same amidst many folds, cursor navigation behaves almost like a scrollOffset is set (keeping the cursor in the center always).

1reaction
naseercommented, Jul 31, 2019

Looks like zz is the binding I was looking for 😃 Still would be nice if the cursor was centered by default after the search.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Precisely move the 3D cursor - Blender Stack Exchange
If you want to move the 3D cursor to the center of the scene, press Shift + C . Share.
Read more >
How to center a "<div>" or making the cursor not to detect it
I'm working on a Home Page with a fullscreen background with "particles" moving everywhere. The particles detect the mouse cursor and move with ......
Read more >
Blender 3D: Noob to Pro/3D View Windows - Wikibooks
You'll do a lot of work in these windows, so you will need to learn your way ... to change viewport options and...
Read more >
How to use the 3D cursor in Blender - Artisticrender.com
If the 3D cursor isn't visible, you can press Shift+C to try to center the 3D cursor or Shift+Right-click anywhere to move the...
Read more >
A guide to custom cursors in Webflow
This div will contain our always-on-top cursor. ... Exit to the very first screen of the IX panel and choose mouse move in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found