bindings: make a key defined as string work also in browser and viewer
parent
ae9ec6d4ad
commit
bdd8920081
|
@ -303,6 +303,10 @@ char *do_browser(char *path)
|
||||||
/* Try opening and reading the selected directory. */
|
/* Try opening and reading the selected directory. */
|
||||||
path = mallocstrcpy(path, filelist[selected]);
|
path = mallocstrcpy(path, filelist[selected]);
|
||||||
goto read_directory_contents;
|
goto read_directory_contents;
|
||||||
|
#ifdef ENABLE_NANORC
|
||||||
|
} else if (func == (void *)implant) {
|
||||||
|
implant(first_sc_for(MBROWSER, func)->expansion);
|
||||||
|
#endif
|
||||||
} else if (func == do_exit) {
|
} else if (func == do_exit) {
|
||||||
/* Exit from the file browser. */
|
/* Exit from the file browser. */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -215,6 +215,10 @@ void do_help(void)
|
||||||
do_findprevious();
|
do_findprevious();
|
||||||
} else if (func == do_findnext) {
|
} else if (func == do_findnext) {
|
||||||
do_findnext();
|
do_findnext();
|
||||||
|
#ifdef ENABLE_NANORC
|
||||||
|
} else if (func == (void *)implant) {
|
||||||
|
implant(first_sc_for(MHELP, func)->expansion);
|
||||||
|
#endif
|
||||||
} else if (kbinput == KEY_WINCH) {
|
} else if (kbinput == KEY_WINCH) {
|
||||||
; /* Nothing to do. */
|
; /* Nothing to do. */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -458,7 +458,7 @@ void parse_binding(char *ptr, bool dobind)
|
||||||
|
|
||||||
/* Now limit the given menu to those where the function exists. */
|
/* Now limit the given menu to those where the function exists. */
|
||||||
if (is_universal(newsc->func))
|
if (is_universal(newsc->func))
|
||||||
menu = menu & MMOST;
|
menu = menu & (MMOST | (newsc->func == (void *)implant ? MHELP : 0));
|
||||||
else
|
else
|
||||||
menu = menu & mask;
|
menu = menu & mask;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue