From cc698987d53b43ba30fa28427b1ccd8fe2ed5070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 31 Jan 2017 22:09:38 +0100 Subject: vis: support rudimentary help search using :help pattern The argument needs to be a valid regular expression. It currently clobbers the last used search term and hence allows repeated searches using `n` and `N` respectively. --- vis-cmds.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vis-cmds.c') diff --git a/vis-cmds.c b/vis-cmds.c index 8e512cc..fc823c8 100644 --- a/vis-cmds.c +++ b/vis-cmds.c @@ -753,6 +753,9 @@ static bool cmd_help(Vis *vis, Win *win, Command *cmd, const char *argv[], Curso text_appendf(txt, " %-32s\t%s\n", configs[i].name, configs[i].enabled ? "yes" : "no"); text_save(txt, NULL); + + if (argv[1]) + vis_motion(vis, VIS_MOVE_SEARCH_FORWARD, argv[1]); return true; } -- cgit v1.2.3