To: vim-dev@vim.org Subject: Patch 6.2.282 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.282 Problem: When using CTRL-O to go back to a help file, it becomes listed. (Andrew Nesbit) Using ":tag" or ":tjump" in a help file doesn't keep the help file settings (e.g. for 'iskeyword'). Solution: Don't mark a buffer as listed when its help flag is set. Put all the option settings for a help buffer together in do_ecmd(). Files: src/ex_cmds.c *** ../vim-6.2.281/src/ex_cmds.c Wed Feb 4 21:42:30 2004 --- src/ex_cmds.c Fri Feb 20 22:00:27 2004 *************** *** 2835,2846 **** if ((flags & ECMD_SET_HELP) || keep_help_flag) { curbuf->b_help = TRUE; #ifdef FEAT_QUICKFIX set_string_option_direct((char_u *)"buftype", -1, ! (char_u *)"help", OPT_FREE |OPT_LOCAL); #endif ! curbuf->b_p_ma = FALSE; curbuf->b_p_bin = FALSE; /* reset 'bin' before reading file */ curwin->w_p_nu = 0; /* no line numbers */ #ifdef FEAT_SCROLLBIND --- 2835,2873 ---- if ((flags & ECMD_SET_HELP) || keep_help_flag) { + char_u *p; + curbuf->b_help = TRUE; #ifdef FEAT_QUICKFIX set_string_option_direct((char_u *)"buftype", -1, ! (char_u *)"help", OPT_FREE|OPT_LOCAL); ! #endif ! ! /* ! * Always set these options after jumping to a help tag, because the ! * user may have an autocommand that gets in the way. ! * Accept all ASCII chars for keywords, except ' ', '*', '"', '|', and ! * latin1 word characters (for translated help files). ! * Only set it when needed, buf_init_chartab() is some work. ! */ ! p = ! #ifdef EBCDIC ! (char_u *)"65-255,^*,^|,^\""; ! #else ! (char_u *)"!-~,^*,^|,^\",192-255"; #endif ! if (STRCMP(curbuf->b_p_isk, p) != 0) ! { ! set_string_option_direct((char_u *)"isk", -1, p, ! OPT_FREE|OPT_LOCAL); ! check_buf_options(curbuf); ! (void)buf_init_chartab(curbuf, FALSE); ! } ! ! curbuf->b_p_ts = 8; /* 'tabstop' is 8 */ ! curwin->w_p_list = FALSE; /* no list mode */ ! ! curbuf->b_p_ma = FALSE; /* not modifiable */ curbuf->b_p_bin = FALSE; /* reset 'bin' before reading file */ curwin->w_p_nu = 0; /* no line numbers */ #ifdef FEAT_SCROLLBIND *************** *** 2869,2875 **** #ifdef FEAT_AUTOCMD buf = curbuf; #endif ! set_buflisted(TRUE); } #ifdef FEAT_AUTOCMD --- 2896,2905 ---- #ifdef FEAT_AUTOCMD buf = curbuf; #endif ! /* Don't make a buffer listed if it's a help buffer. Useful when ! * using CTRL-O to go back to a help file. */ ! if (!curbuf->b_help) ! set_buflisted(TRUE); } #ifdef FEAT_AUTOCMD *************** *** 4649,4677 **** if (alt_fnum != 0 && curwin->w_alt_fnum == empty_fnum) curwin->w_alt_fnum = alt_fnum; - /* - * Always set these options after jumping to a help tag, because the user - * may have an autocommand that gets in the way. - * Accept all ASCII chars for keywords, except ' ', '*', '"', '|', and - * latin1 word characters (for translated help files). - * Only set it when needed, buf_init_chartab() is some work. - */ - p = - #ifdef EBCDIC - (char_u *)"65-255,^*,^|,^\""; - #else - (char_u *)"!-~,^*,^|,^\",192-255"; - #endif - if (STRCMP(curbuf->b_p_isk, p) != 0) - { - set_string_option_direct((char_u *)"isk", -1, p, OPT_FREE|OPT_LOCAL); - check_buf_options(curbuf); - (void)buf_init_chartab(curbuf, FALSE); - } - - curbuf->b_p_ts = 8; - curwin->w_p_list = FALSE; - erret: if (need_free) vim_free(arg); --- 4705,4710 ---- *** ../vim-6.2.281/src/version.c Fri Feb 20 21:53:42 2004 --- src/version.c Fri Feb 20 21:54:54 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 282, /**/ -- hundred-and-one symptoms of being an internet addict: 205. You're constantly yelling at your spouse, family, roommate, whatever, for using the phone for stupid things...like talking. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///