Mercurial > vim
comparison src/ex_cmds.c @ 9945:d63a89b526ea v7.4.2246
commit https://github.com/vim/vim/commit/d6f2ee32dcfa18c781ef157918b524318a2215a2
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 24 00:30:52 2016 +0200
patch 7.4.2246
Problem: Oldfiles test fails.
Solution: Include missing changes.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 24 Aug 2016 00:45:05 +0200 |
parents | 05bfc3d37efb |
children | 80008b4e197e |
comparison
equal
deleted
inserted
replaced
9944:ff39af40ed2b | 9945:d63a89b526ea |
---|---|
8454 ex_oldfiles(exarg_T *eap UNUSED) | 8454 ex_oldfiles(exarg_T *eap UNUSED) |
8455 { | 8455 { |
8456 list_T *l = get_vim_var_list(VV_OLDFILES); | 8456 list_T *l = get_vim_var_list(VV_OLDFILES); |
8457 listitem_T *li; | 8457 listitem_T *li; |
8458 int nr = 0; | 8458 int nr = 0; |
8459 char_u *reg_pat = NULL; | |
8460 char_u *fname; | 8459 char_u *fname; |
8461 regmatch_T regmatch; | |
8462 | 8460 |
8463 if (l == NULL) | 8461 if (l == NULL) |
8464 msg((char_u *)_("No old files")); | 8462 msg((char_u *)_("No old files")); |
8465 else | 8463 else |
8466 { | 8464 { |
8467 if (*eap->arg != NUL) | |
8468 { | |
8469 if (skip_vimgrep_pat(eap->arg, ®_pat, NULL) == NULL) | |
8470 { | |
8471 EMSG(_(e_invalpat)); | |
8472 return; | |
8473 } | |
8474 regmatch.regprog = vim_regcomp(reg_pat, p_magic ? RE_MAGIC : 0); | |
8475 if (regmatch.regprog == NULL) | |
8476 return; | |
8477 } | |
8478 | |
8479 msg_start(); | 8465 msg_start(); |
8480 msg_scroll = TRUE; | 8466 msg_scroll = TRUE; |
8481 for (li = l->lv_first; li != NULL && !got_int; li = li->li_next) | 8467 for (li = l->lv_first; li != NULL && !got_int; li = li->li_next) |
8482 { | 8468 { |
8483 ++nr; | 8469 ++nr; |
8484 fname = get_tv_string(&li->li_tv); | 8470 fname = get_tv_string(&li->li_tv); |
8485 if (reg_pat == NULL || *reg_pat == NUL | 8471 if (!message_filtered(fname)) |
8486 || vim_regexec(®match, fname, (colnr_T)0)) | |
8487 { | 8472 { |
8488 msg_outnum((long)nr); | 8473 msg_outnum((long)nr); |
8489 MSG_PUTS(": "); | 8474 MSG_PUTS(": "); |
8490 msg_outtrans(fname); | 8475 msg_outtrans(fname); |
8491 msg_putchar('\n'); | 8476 msg_putchar('\n'); |
8492 out_flush(); /* output one line at a time */ | 8477 out_flush(); /* output one line at a time */ |
8493 ui_breakcheck(); | 8478 ui_breakcheck(); |
8494 } | 8479 } |
8495 } | 8480 } |
8496 if (*eap->arg != NUL) | |
8497 vim_regfree(regmatch.regprog); | |
8498 | 8481 |
8499 /* Assume "got_int" was set to truncate the listing. */ | 8482 /* Assume "got_int" was set to truncate the listing. */ |
8500 got_int = FALSE; | 8483 got_int = FALSE; |
8501 | 8484 |
8502 # ifdef FEAT_BROWSE_CMD | 8485 # ifdef FEAT_BROWSE_CMD |