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

Drawer cursor shifting by 2 lines when opening selected item #299

Open
vais opened this issue Jan 9, 2025 · 0 comments
Open

Drawer cursor shifting by 2 lines when opening selected item #299

vais opened this issue Jan 9, 2025 · 0 comments

Comments

@vais
Copy link

vais commented Jan 9, 2025

One thing I noticed when I first tried the plugin is that every time I run a query using a helper in the drawer, the drawer jumps by one or two lines. I thought it was some sort of a glitch, but it actually has to do with the Buffers section first appearing in the drawer and scrolling it by two lines, then growing by 1 line as each new buffer is added to the list.

BEFORE pressing Enter over the List helper:
Screen Shot 2025-01-08 at 9 27 43 PM

AFTER pressing Enter over the List helper, then returning focus back to drawer - note the current line has changed:
Screen Shot 2025-01-08 at 9 29 21 PM

The root cause is that the Schemas section is below the Buffers section in the drawer. Initially, the Buffers section doesn't exist, then it appears, causing the drawer to be scrolled by two lines. From that point forward, it shifts by 1 line for each new buffer created. It's kind of an annoying behavior, and it makes you "loose your place" in the navigation as you navigate in and out of the drawer - the desired behavior would be for the cursor to stay in the same place and not jump lines.

I think the easiest fix is to simply re-arrange the sections, so that the Schemas secition is positioned right below "+ New Query". What do you think?

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

1 participant