Home / GitHub Page

Top of terminal app vanishes when cycling through available commands

The terminal app scrolls the top out of visibility when entering command mode and using Tab to cycle through the available choices.

Imgur

There are 2 ways I can think of to mitigate this behavior. We could

  • reserve 2 lines at the bottom
  • move the area for the different choices above the command line (shift the bottom line of the notebook, notelist, note panes by one towards the top / make the text window by one line smaller)

This is not very important, but annoying. Who knows, maybe it’s an easy fix.

I definitely have ran into this problem myself. I wonder if just implementing something like the standard Ctrl+L to just clear the commands out and refresh the terminal would be a good enough fix?

Actually, better yet, what about implementing something similar to what Vim does: when running commands, it goes into a Command Mode and when that command is completed, it returns the app back into its Normal Mode (Sort of like Preview Mode here). Maybe when entering Command Mode, create a terminal snapshot of where everything is placed on the screen before hand, then upon exiting, restore that snapshot and refresh the screen?

A major added benefit to that approach would be that if a user customized their layout a bit, they wouldn’t have to redo it every time. That is honestly one of the worst things I’ve seen devs do with a small handful of apps. Ha

There’s a forceRender() method that maybe could be called to redraw the screen properly after entering the selection.

Ok, I’ll have a look. I have to find the proper file first…