[tfman] change up control for horizontal structure bar #2457

This commit is contained in:
nick black 2021-12-16 17:10:12 -05:00 committed by nick black
parent 973175ce49
commit 59fd31c050
4 changed files with 16 additions and 12 deletions

View File

@ -992,7 +992,6 @@ list(FILTER TESTDATA EXCLUDE REGEX ".*osp$")
install(FILES ${TESTDATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/notcurses)
endif()
list(FILTER MANPAGES1 EXCLUDE REGEX "tfman.1")
install(FILES ${MANPAGES1} DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man1)
install(FILES ${MANPAGES3} DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man3)
file(GLOB MARKDOWN CONFIGURE_DEPENDS *.md)
@ -1003,9 +1002,9 @@ if(BUILD_EXECUTABLES)
install(TARGETS notcurses-demo DESTINATION bin)
install(TARGETS notcurses-info DESTINATION bin)
install(TARGETS ncneofetch DESTINATION bin)
#if(NOT WIN32)
#install(TARGETS tfman DESTINATION bin)
#endif()
if(NOT WIN32)
install(TARGETS tfman DESTINATION bin)
endif()
if(${USE_CXX})
install(TARGETS notcurses-input DESTINATION bin)
install(TARGETS nctetris DESTINATION bin)

View File

@ -138,7 +138,7 @@ others are external.
## Included tools
Nine binaries are installed as part of Notcurses:
Nine executables are installed as part of Notcurses:
* `ncls`: an `ls` that displays multimedia in the terminal
* `ncneofetch`: a [neofetch](https://github.com/dylanaraps/neofetch) ripoff
* `ncplayer`: renders visual media (images/videos)
@ -147,6 +147,7 @@ Nine binaries are installed as part of Notcurses:
* `notcurses-info`: detect and print terminal capabilities/diagnostics
* `notcurses-input`: decode and print keypresses
* `notcurses-tester`: unit testing
* `tfman`: a swank manual browser
To run `notcurses-demo` from a checkout, provide the `data` directory via
the `-p` argument. Demos requiring data files will otherwise abort. The base
@ -276,10 +277,10 @@ If things break or seem otherwise lackluster, **please** consult the
<details>
<summary>We're paying by the electron, and have no C++ compiler. Can we still
enjoy Notcurses goodness?</summary>
Some of it! You won't be able to build several binaries, nor the NCPP C++
Some of it! You won't be able to build several executables, nor the NCPP C++
wrappers, nor can you build with the OpenImageIO multimedia backend (OIIO
ships C++ headers). You'll be able to build the main library, though, as
well as <code>notcurses-demo</code> (and maybe a few other binaries).
well as <code>notcurses-demo</code> (and maybe a few other programs).
Use <code>-DUSE_CXX=off</code>.
</details>

View File

@ -41,10 +41,11 @@ The following keypresses are recognized:
* **q**: Quit.
* **k**/**up**: Move up by one line.
* **b**/**pgup**: Move up by one page.
* **h**/**left**: Move up by one section.
* **j**/**down**: Move down by one line.
* **f**/**pgdown**: Move down by one page.
* **l**/**right**: Move down by one section.
* **s**: Toggle the structure browser's visibility.
* **Tab**: Move between the page and structure browser.
The mouse wheel can also be used to move up and down within the active browser.

View File

@ -433,8 +433,8 @@ render_troff(struct notcurses* nc, const unsigned char* map, size_t mlen,
return pman;
}
static const char USAGE_TEXT[] = "⇆/s⎢⎥b⇞k↑↓j⇟f⎢ (q)uit";
static const char USAGE_TEXT_ASCII[] = "(tab/s) (bkjf) (q)uit";
static const char USAGE_TEXT[] = "h←s→l⎢⎥b⇞k↑↓j⇟f⎢ (q)uit";
static const char USAGE_TEXT_ASCII[] = "(hsl) (bkjf) (q)uit";
static int
draw_bar(struct ncplane* bar, pagedom* dom){
@ -569,8 +569,11 @@ manloop(struct notcurses* nc, const char* arg, unsigned noui){
case 's':
docstructure_toggle(page, bar, dom.ds);
break;
case NCKEY_TAB: case L'\u21c6':
// FIXME switch between browsers
case 'h': case NCKEY_LEFT:
// FIXME
break;
case 'l': case NCKEY_RIGHT:
// FIXME
break;
case 'k': case NCKEY_UP:
if(ncplane_y(page) < 1){