Commit Graph

14 Commits (d8a7a4332d7dc9e5ef9e450634c430d162350893)

Author SHA1 Message Date
sammyette 7288f85e9a
feat(commands/doc): add subdocs as additional pages 2023-10-24 23:51:42 -04:00
sammyette 554fb009f8
fix(greenhouse): add enter bind to goto page on table of contents 2023-10-24 23:38:19 -04:00
sammyette 19bb05f001
feat: pager improvements
- make use of full terminal space properly in doc and greenhouse
commands
- add some info in doc command like currently viewed doc
and description at the bottom instead of top of doc (this makes it persistent)
- add contents function to Greenhouse to allow showing custom contents
in the table of contents (this will be used for lazy loading in the future)
2023-07-11 22:29:15 -04:00
sammyette b9bb14497f
fix(greenhouse): print contents properly
on the last line that can be displayed, don't print with a newline
this removes the space at the end
2023-07-11 22:28:11 -04:00
sammyette 5b4b055c6c
fix(greenhouse): set scroll boundary properly, fix text cutoff
this means you can no longer scroll away the text until it isnt seen
this commit also fixes text cutoff when using lunacolors
(like in the doc command)
2023-07-11 20:25:25 -04:00
sammyette ade14a6238
fix(greenhouse): fix toc disappearing on any key press 2023-07-10 18:00:49 -04:00
sammyette 11da2c0c45
feat(greenhouse): add goto command
made some other minor changes (in terms of how much it
matters to the user)

the toc page is now a "special page"
in a next commit itll also be used for a help page

cursor gets hidden unless typing a command
2023-07-09 23:39:11 -04:00
sammyette 8b672f5b95
feat(greenhouse): add command handling 2023-07-09 23:07:32 -04:00
sammyette 0bb97a6f3b
feat: add table of contents to pager
another change in this commit is having a separate render
function for the greenhouse caller to handle ui

this means there isnt a hardcoded space at the bottom to
display command and status line
2023-07-09 22:38:34 -04:00
sammyette 713f24aa3e
feat(greenhouse): add functions for custom keybinds 2023-07-09 20:22:59 -04:00
sammyette b6315639b2
feat: add getChar function to editor interface
this is a simple command that returns a single key from the user.
this can be used to read keystrokes in an interactive program
like how greenhouse (the pager) does it
2023-07-09 16:27:11 -04:00
sammyette 076118d237
feat: make doc command use pager 2023-04-11 20:44:29 -04:00
sammyette ec0692edeb
fix(nature/greenhouse): reset line offset when switching pages 2023-02-19 17:05:25 -04:00
sammyette 179bec7ae5
feat(nature/greenhouse): support setting multiple pages 2023-02-19 16:53:39 -04:00