Mercurial > vim
changeset 514:5ffc9de8bb26
updated for version 7.0144
author | vimboss |
---|---|
date | Fri, 09 Sep 2005 19:47:12 +0000 |
parents | 6e2a7416d228 |
children | 04dcb5a1f2f9 |
files | src/proto/message.pro src/quickfix.c src/tag.c |
diffstat | 3 files changed, 24 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/src/proto/message.pro +++ b/src/proto/message.pro @@ -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));
--- a/src/quickfix.c +++ b/src/quickfix.c @@ -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)
--- 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.