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

Add help buffer #289

Merged
merged 3 commits into from
Nov 16, 2024
Merged

Add help buffer #289

merged 3 commits into from
Nov 16, 2024

Conversation

richiejp
Copy link
Contributor

@richiejp richiejp commented Nov 14, 2024

This adds a help buffer activated by pressing '?'

The initial version is slightly different from planned because it uses 3 columns instead of 1 to help with layout.

TODO:

  • Add a type to the UI buffer that the event handlers can read and make sure invalid handlers do not run on help
  • Describe all of the keys (perhaps add the help text to an event handlers table or the key bindings table)
  • Add tests
  • Update the status when in help to "Press to close help"

@richiejp richiejp force-pushed the sheet-help branch 3 times, most recently from f08d018 to 2b6edca Compare November 15, 2024 13:31
@richiejp
Copy link
Contributor Author

Don't need to add a type to the UI buffer for this because we can check if there is a file name so I crossed that out. Either a type or some way for event handlers/procedures to be swapped out will be needed if more buffer types are added or if extensions are to be able to hook into this.

Pressing the escape key pauses for 1 second while curses waits for an
escape sequence. This reduces it to 30ms so there isn't any noticeable
latency.

I can only assume this is OK on a modern virtual terminal.
It seems in most shells echo does not default to interpreting escape
sequences so add -e.
@richiejp richiejp marked this pull request as ready for review November 15, 2024 14:42
@liquidaty liquidaty merged commit ef5a55f into liquidaty:main Nov 16, 2024
11 checks passed
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

Successfully merging this pull request may close these issues.

2 participants