From 8f535582ad8fd706502bee619a19bbb29a981d9d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 17:30:31 +0200 Subject: updated for version 7.3.327 Problem: When jumping to a help tag a closed fold doesn't open. Solution: Save and restore KeyTyped. (Yasuhiro Matsumoto) --- src/ex_cmds.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/ex_cmds.c') diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 36b0e5228..b433bca40 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5508,6 +5508,9 @@ ex_help(eap) int len; char_u *lang; #endif +#ifdef FEAT_FOLDING + int old_KeyTyped = KeyTyped; +#endif if (eap != NULL) { @@ -5671,6 +5674,12 @@ ex_help(eap) if (!p_im) restart_edit = 0; /* don't want insert mode in help file */ +#ifdef FEAT_FOLDING + /* Restore KeyTyped, setting 'filetype=help' may reset it. + * It is needed for do_tag top open folds under the cursor. */ + KeyTyped = old_KeyTyped; +#endif + if (tag != NULL) do_tag(tag, DT_HELP, 1, FALSE, TRUE); -- cgit v1.2.3