]> granicus.if.org Git - vim/commitdiff
updated for version 7.0144
authorBram Moolenaar <Bram@vim.org>
Fri, 9 Sep 2005 19:47:12 +0000 (19:47 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 9 Sep 2005 19:47:12 +0000 (19:47 +0000)
src/proto/message.pro
src/quickfix.c
src/tag.c

index e0e2e6e81de3177fb9f21ba181b05cf16eaf9a08..a4095f263e29643df06435547f7171cb60c52c73 100644 (file)
@@ -3,7 +3,7 @@ int msg __ARGS((char_u *s));
 int verb_msg __ARGS((char_u *s));
 int msg_attr __ARGS((char_u *s, int attr));
 int msg_attr_keep __ARGS((char_u *s, int attr, int keep));
-char_u *msg_strtrunc __ARGS((char_u *s));
+char_u *msg_strtrunc __ARGS((char_u *s, int force));
 void trunc_string __ARGS((char_u *s, char_u *buf, int room));
 void reset_last_sourcing __ARGS((void));
 void msg_source __ARGS((int attr));
index d595c4f5ef3f113d744df7229c92f9807d196066..56f1671aea4374f2a7d10b25b2e63450cf688e87 100644 (file)
@@ -2491,7 +2491,7 @@ ex_vimgrep(eap)
            /* Display the file name every second or so. */
            seconds = time(NULL);
            msg_start();
-           p = msg_strtrunc(fnames[fi]);
+           p = msg_strtrunc(fnames[fi], TRUE);
            if (p == NULL)
                msg_outtrans(fnames[fi]);
            else
@@ -2824,10 +2824,7 @@ get_errorlist(list)
     int                i;
 
     if (qf_curlist >= qf_listcount || qf_lists[qf_curlist].qf_count == 0)
-    {
-       EMSG(_(e_quickfix));
        return FAIL;
-    }
 
     qfp = qf_lists[qf_curlist].qf_start;
     for (i = 1; !got_int && i <= qf_lists[qf_curlist].qf_count; ++i)
index 8351f1b024637fed73026696eafa3fc13cd57305..4a19ba81092fd053ca3dead1589b1f076a786053 100644 (file)
--- a/src/tag.c
+++ b/src/tag.c
@@ -68,7 +68,6 @@ static char   *mt_names[MT_COUNT/2] =
 static char_u  *nofile_fname = NULL;   /* fname for NOTAGFILE error */
 
 static void taglen_advance __ARGS((int l));
-static int get_tagfname __ARGS((int first, char_u *buf));
 
 static int jumpto_tag __ARGS((char_u *lbuf, int forceit, int keep_help));
 #ifdef FEAT_EMACS_TAGS
@@ -2370,7 +2369,7 @@ free_tag_stuff()
  *
  * Return FAIL if no more tag file names, OK otherwise.
  */
-    static int
+    int
 get_tagfname(first, buf)
     int                first;  /* TRUE when first file name is wanted */
     char_u     *buf;   /* pointer to buffer of MAXPATHL chars */
@@ -2381,14 +2380,15 @@ get_tagfname(first, buf)
     char_u             *fname = NULL;
     char_u             *r_ptr;
 
-    if (first)
+    if (curbuf->b_help)
     {
-       if (curbuf->b_help)
+       /*
+        * For help files it's done in a completely different way:
+        * Find "doc/tags" and "doc/tags-??" in all directories in
+        * 'runtimepath'.
+        */
+       if (first)
        {
-           /*
-            * For a help window find "doc/tags" and "doc/tags-??" in all
-            * directories in 'runtimepath'.
-            */
            ga_clear_strings(&tag_fnames);
            ga_init2(&tag_fnames, (int)sizeof(char_u *), 10);
            do_in_runtimepath((char_u *)
@@ -2408,17 +2408,7 @@ get_tagfname(first, buf)
                                              , TRUE, found_tagfile_cb, NULL);
            hf_idx = 0;
        }
-       else if (*curbuf->b_p_tags != NUL)
-           np = curbuf->b_p_tags;
-       else
-           np = p_tags;
-       vim_findfile_free_visited(search_ctx);
-       did_filefind_init = FALSE;
-    }
-
-    if (curbuf->b_help)
-    {
-       if (hf_idx >= tag_fnames.ga_len)
+       else if (hf_idx >= tag_fnames.ga_len)
        {
            /* Not found in 'runtimepath', use 'helpfile', if it exists and
             * wasn't used yet, replacing "help.txt" with "tags". */
@@ -2431,12 +2421,23 @@ get_tagfname(first, buf)
        else
            vim_strncpy(buf, ((char_u **)(tag_fnames.ga_data))[hf_idx++],
                                                                MAXPATHL - 1);
+       return OK;
+    }
+
+    if (first)
+    {
+       /* Init. */
+       if (*curbuf->b_p_tags != NUL)
+           np = curbuf->b_p_tags;
+       else
+           np = p_tags;
+       vim_findfile_free_visited(search_ctx);
+       did_filefind_init = FALSE;
     }
     else
     {
-       /* tried already (or bogus call) */
        if (np == NULL)
-           return FAIL;
+           return FAIL;        /* tried already (or bogus call) */
 
        /*
         * Loop until we have found a file name that can be used.