updated for version 7.0144
diff --git a/src/proto/message.pro b/src/proto/message.pro
index e0e2e6e..a4095f2 100644
--- a/src/proto/message.pro
+++ b/src/proto/message.pro
@@ -3,7 +3,7 @@
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));
diff --git a/src/quickfix.c b/src/quickfix.c
index d595c4f..56f1671 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2491,7 +2491,7 @@
/* 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 @@
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)
diff --git a/src/tag.c b/src/tag.c
index 8351f1b..4a19ba8 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -68,7 +68,6 @@
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 @@
*
* 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 @@
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 @@
, 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 @@
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.