Add support g/Home keys to tfman

This commit is contained in:
Dmitry Atamanov 2022-05-25 22:31:48 +05:00 committed by nick black
parent 142d3ab4e9
commit 7eb51cb456
2 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,7 @@ The following keypresses are recognized:
* **j**/**down**: Move down by one line. * **j**/**down**: Move down by one line.
* **f**/**pgdown**: Move down by one page. * **f**/**pgdown**: Move down by one page.
* **l**/**right**: Move down by one section. * **l**/**right**: Move down by one section.
* **g**/**home**: Go to first line in file.
* **s**: Toggle the structure browser's visibility. * **s**: Toggle the structure browser's visibility.
The mouse wheel can also be used to move up and down within the active browser. The mouse wheel can also be used to move up and down within the active browser.

View File

@ -613,6 +613,9 @@ manloop(struct notcurses* nc, const char* arg, unsigned noui){
newy = ncplane_y(page) - (int)ncplane_dim_y(stdn) + 1; newy = ncplane_y(page) - (int)ncplane_dim_y(stdn) + 1;
movedown = true; movedown = true;
break; break;
case 'g': case NCKEY_HOME:
newy = 1;
break;
}case 'q': }case 'q':
ret = 0; ret = 0;
goto done; goto done;