Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
michael105 committed Oct 28, 2024
1 parent 8ab2f55 commit a897ab0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ BIND( XK_ANY_MOD, XK_Home, scrolltotop, { },MODE_LESS ),


// help mode
BIND( XK_ANY_MOD, XK_q, showhelp, { 0},IMODE_HELP ),
BIND( XK_ANY_MOD, XK_Escape, showhelp, { 0},IMODE_HELP ),
BIND( XK_ANY_MOD, XK_q, quithelp, { 0},IMODE_HELP ),
BIND( XK_ANY_MOD, XK_Escape, quithelp, { 0},IMODE_HELP ),
BIND( XK_ANY_MOD, XK_Up, kscrollup, {.i = 1},IMODE_HELP ),
BIND( XK_ANY_MOD, XK_Down, kscrolldown, {.i = 1},IMODE_HELP ),
BIND( XK_ANY_MOD, XK_Page_Up, kscrollup, {.i = -1},IMODE_HELP ),
Expand Down
11 changes: 5 additions & 6 deletions src/help.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ scrollmarks and lessmode are disabled.\n\r\
Shift + Home/End: Scroll to top/bottom\n\r\
Shift + Backspace: Scroll to the location of the last command (shell)\n\r\
and enter lessmode\n\r\
Shift+Enter: Execute command, enter lessmode if more than\n\r\
one screen is displayed by the command.\n\r\
\n\r\
\n\r\
Clipboard:\n\r\
Expand Down Expand Up @@ -104,13 +106,10 @@ scrollmarks and lessmode are disabled.\n\r\
enter lessmode\n\r\
\n\r\
Tab: Scroll downwards to the next entered command line\n\r\
\n\r\
Shift+Enter: Execute command, enter lessmode if more than\n\r\
one screen is displayed by the command.\n\r\
\n\r\
Ctrl+Alt + [0..9]: Set Scrollmark 0 - 9\n\r\
Ctrl + [0..9]: Goto Scrollmark 0 - 9\n\r\
Lessmode: [0..9]: Goto Scrollmark 0 - 9\n\r\
Lessmode: [0..9]: Goto Retmark 1 - 10\n\r\
\n\r\
\n\r\
\n\r\
Expand Down Expand Up @@ -232,12 +231,12 @@ All Shift+Alt Page_Up zoom \n\r\
Help All ALL_KEYS dummy \n\r\
Help All Down kscrolldown \n\r\
Help All End scrolltobottom \n\r\
Help All Escape showhelp \n\r\
Help All Escape quithelp \n\r\
Help All Home scrolltotop \n\r\
Help All Page_Down kscrolldown \n\r\
Help All Page_Up kscrollup \n\r\
Help All Up kscrollup \n\r\
Help All q showhelp \n\r\
Help All q quithelp \n\r\
Help All space kscrolldown \n\r\
Less All 0 retmark \n\r\
Less All 1 retmark \n\r\
Expand Down
7 changes: 3 additions & 4 deletions src/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ ${BOLD}Scrolling:$N
Shift + Home/End: Scroll to top/bottom
Shift + Backspace: Scroll to the location of the last command (shell)
and enter lessmode
Shift+Enter: Execute command, enter lessmode if more than
one screen is displayed by the command.


${BOLD}Clipboard:$N
Expand Down Expand Up @@ -76,12 +78,9 @@ $BOLD${UL}${LGREEN}Lessmode:$N

Tab: Scroll downwards to the next entered command line

Shift+Enter: Execute command, enter lessmode if more than
one screen is displayed by the command.

Ctrl+Alt + [0..9]: Set Scrollmark 0 - 9
Ctrl + [0..9]: Goto Scrollmark 0 - 9
Lessmode: [0..9]: Goto Scrollmark 0 - 9
Lessmode: [0..9]: Goto Retmark 1 - 10



Expand Down
4 changes: 2 additions & 2 deletions src/keyref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ All Shift+Alt Page_Up zoom
Help All ALL_KEYS dummy
Help All Down kscrolldown
Help All End scrolltobottom
Help All Escape showhelp
Help All Escape quithelp
Help All Home scrolltotop
Help All Page_Down kscrolldown
Help All Page_Up kscrollup
Help All Up kscrollup
Help All q showhelp
Help All q quithelp
Help All space kscrolldown
Less All 0 retmark
Less All 1 retmark
Expand Down
11 changes: 6 additions & 5 deletions src/term.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ void inverse_screen(){
redraw();
}

// TODO: show help screen. Too many keys to remember. misc.
void quithelp( const Arg *a ){
showhelp( a );
}

void showhelp(const Arg *a) {
//printf("showhelp\n");

Expand Down Expand Up @@ -211,8 +214,7 @@ void showhelp(const Arg *a) {
//twrite( helpcontents, strlen(helpcontents), 0 );
}
}
Arg a = { .i=LESSMODE_ON };
lessmode_toggle( &a );
lessmode_toggle( ARGPi( LESSMODE_ON) );

help_storedinputmode = inputmode;
inputmode = inputmode | IMODE_HELP;
Expand All @@ -230,8 +232,7 @@ void showhelp(const Arg *a) {
//inputmode = inputmode & ~(MODE_LESS | IMODE_HELP);
showstatus(0,0);
term = p_help_storedterm;
Arg a = { .i=LESSMODE_OFF };
lessmode_toggle( &a ); // bugs else.
lessmode_toggle( ARGPi( LESSMODE_OFF ) ); // bugs else.
if ( ( p_help->row != term->row ) || ( p_help->col != term->col ))
tresize( p_help->col, p_help->row );
}
Expand Down
1 change: 1 addition & 0 deletions src/term.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ void printsel(const Arg *);
void sendbreak(const Arg *);
void toggleprinter(const Arg *);
void showhelp(const Arg *);
void quithelp(const Arg *);
void inverse_screen();

int tisaltscr(void);
Expand Down

0 comments on commit a897ab0

Please sign in to comment.