comparison src/ex_cmds2.c @ 8374:5d834058bf44 v7.4.1479

commit https://github.com/vim/vim/commit/863c1a9079fa340d663ccafb011729a29186d73e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 3 15:47:06 2016 +0100 patch 7.4.1479 Problem: No testfor ":loadplugin". Solution: Add a test. Fix how option is being set.
author Christian Brabandt <cb@256bit.org>
date Thu, 03 Mar 2016 16:00:05 +0100
parents ce791ff9e0da
children e448f2a5d45b
comparison
equal deleted inserted replaced
8373:d0cac5912500 8374:5d834058bf44
3056 * Source filetype detection scripts, if filetype.vim was already done. 3056 * Source filetype detection scripts, if filetype.vim was already done.
3057 */ 3057 */
3058 static void 3058 static void
3059 may_do_filetypes(char_u *pat) 3059 may_do_filetypes(char_u *pat)
3060 { 3060 {
3061 char_u *cmd = vim_strsave((char_u *)"did_load_filetypes"); 3061 char_u *cmd = vim_strsave((char_u *)"g:did_load_filetypes");
3062 3062
3063 /* If runtime/filetype.vim wasn't loaded yet, the scripts will be found 3063 /* If runtime/filetype.vim wasn't loaded yet, the scripts will be found
3064 * when it loads. */ 3064 * when it loads. */
3065 if (cmd != NULL && eval_to_number(cmd) > 0) 3065 if (cmd != NULL && eval_to_number(cmd) > 0)
3066 { 3066 {
3067 do_cmdline_cmd((char_u *)"augroup filetypedetect"); 3067 do_cmdline_cmd((char_u *)"augroup filetypedetect");
3068 source_runtime(pat, TRUE); 3068 do_in_path(p_pp, pat, TRUE, source_callback, NULL);
3069 do_cmdline_cmd((char_u *)"augroup END"); 3069 do_cmdline_cmd((char_u *)"augroup END");
3070 } 3070 }
3071 vim_free(cmd); 3071 vim_free(cmd);
3072 } 3072 }
3073 3073
3123 new_rtp[keep] = ','; 3123 new_rtp[keep] = ',';
3124 mch_memmove(new_rtp + keep + 1, fname, addlen + 1); 3124 mch_memmove(new_rtp + keep + 1, fname, addlen + 1);
3125 if (p_rtp[keep] != NUL) 3125 if (p_rtp[keep] != NUL)
3126 mch_memmove(new_rtp + keep + 1 + addlen, p_rtp + keep, 3126 mch_memmove(new_rtp + keep + 1 + addlen, p_rtp + keep,
3127 oldlen - keep + 1); 3127 oldlen - keep + 1);
3128 free_string_option(p_rtp); 3128 set_option_value((char_u *)"rtp", 0L, new_rtp, 0);
3129 p_rtp = new_rtp; 3129 vim_free(new_rtp);
3130 } 3130 }
3131 *p2 = c; 3131 *p2 = c;
3132 3132
3133 (void)do_source(fname, FALSE, DOSO_NONE); 3133 (void)do_source(fname, FALSE, DOSO_NONE);
3134 } 3134 }