summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-05-20 21:25:31 +0000
committerBram Moolenaar <Bram@vim.org>2005-05-20 21:25:31 +0000
commit35c54e56513137e58a649983fbab6c490820462e (patch)
treebe889f5f102662931bb883f401173a07d8778432 /src
parentc1087e64bcfece96de8fa812535154435bbaaba5 (diff)
updated for version 7.0074
Diffstat (limited to 'src')
-rw-r--r--src/proto/getchar.pro2
-rw-r--r--src/quickfix.c27
-rw-r--r--src/screen.c34
-rw-r--r--src/version.h4
4 files changed, 44 insertions, 23 deletions
diff --git a/src/proto/getchar.pro b/src/proto/getchar.pro
index fc49b79723..7b8d6bc859 100644
--- a/src/proto/getchar.pro
+++ b/src/proto/getchar.pro
@@ -55,7 +55,7 @@ int check_abbr __ARGS((int c, char_u *ptr, int col, int mincol));
int makemap __ARGS((FILE *fd, buf_T *buf));
int put_escstr __ARGS((FILE *fd, char_u *strstart, int what));
void check_map_keycodes __ARGS((void));
-char_u *check_map __ARGS((char_u *keys, int mode, int exact));
+char_u *check_map __ARGS((char_u *keys, int mode, int exact, int ign_mod));
void init_mappings __ARGS((void));
void add_map __ARGS((char_u *map, int mode));
/* vim: set ft=c : */
diff --git a/src/quickfix.c b/src/quickfix.c
index a481b0f316..8d5032221a 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -492,11 +492,15 @@ restofline:
*/
if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */
{
- len = (int)(regmatch.endp[i] - regmatch.startp[i]);
- STRNCPY(namebuf, regmatch.startp[i], len);
- namebuf[len] = NUL;
+ int c = *regmatch.endp[i];
+
+ /* Expand ~/file and $HOME/file to full path. */
+ *regmatch.endp[i] = NUL;
+ expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE);
+ *regmatch.endp[i] = c;
+
if (vim_strchr((char_u *)"OPQ", idx) != NULL
- && mch_getperm(namebuf) == -1)
+ && mch_getperm(namebuf) == -1)
continue;
}
if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */
@@ -2788,8 +2792,9 @@ get_errorlist(list)
* of dictionaries.
*/
int
-set_errorlist(list)
+set_errorlist(list, action)
list_T *list;
+ int action;
{
listitem_T *li;
dict_T *d;
@@ -2801,8 +2806,16 @@ set_errorlist(list)
int valid, status;
int retval = OK;
- /* make place for a new list */
- qf_new_list();
+ if (action == ' ' || qf_curlist == qf_listcount)
+ /* make place for a new list */
+ qf_new_list();
+ else if (action == 'a' && qf_lists[qf_curlist].qf_count > 0)
+ /* Adding to existing list, find last entry. */
+ for (prevp = qf_lists[qf_curlist].qf_start;
+ prevp->qf_next != prevp; prevp = prevp->qf_next)
+ ;
+ else if (action == 'r')
+ qf_free(qf_curlist);
for (li = list->lv_first; li != NULL; li = li->li_next)
{
diff --git a/src/screen.c b/src/screen.c
index 58fb4d029c..0139788757 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4818,6 +4818,7 @@ draw_vsep_win(wp, row)
#ifdef FEAT_WILDMENU
static int status_match_len __ARGS((expand_T *xp, char_u *s));
+static int skip_status_match_char __ARGS((expand_T *xp, char_u *s));
/*
* Get the lenght of an item as it will be shown in the status line.
@@ -4840,12 +4841,7 @@ status_match_len(xp, s)
while (*s != NUL)
{
- /* Don't display backslashes used for escaping, they look ugly. */
- if (rem_backslash(s)
-#ifdef FEAT_MENU
- || (emenu && (s[0] == '\\' && s[1] != NUL))
-#endif
- )
+ if (skip_status_match_char(xp, s))
++s;
len += ptr2cells(s);
mb_ptr_adv(s);
@@ -4855,6 +4851,24 @@ status_match_len(xp, s)
}
/*
+ * Return TRUE for characters that are not displayed in a status match.
+ * These are backslashes used for escaping. Do show backslashes in help tags.
+ */
+ static int
+skip_status_match_char(xp, s)
+ expand_T *xp;
+ char_u *s;
+{
+ return ((rem_backslash(s) && xp->xp_context != EXPAND_HELP)
+#ifdef FEAT_MENU
+ || ((xp->xp_context == EXPAND_MENUS
+ || xp->xp_context == EXPAND_MENUNAMES)
+ && (s[0] == '\t' || (s[0] == '\\' && s[1] != NUL)))
+#endif
+ );
+}
+
+/*
* Show wildchar matches in the status line.
* Show at least the "match" item.
* We start at item 'first_match' in the list and show all matches that fit.
@@ -4989,13 +5003,7 @@ win_redr_status_matches(xp, num_matches, matches, match, showtail)
#endif
for ( ; *s != NUL; ++s)
{
- /* Don't display backslashes used for escaping, they look ugly. */
- if (rem_backslash(s)
-#ifdef FEAT_MENU
- || (emenu
- && (s[0] == '\t' || (s[0] == '\\' && s[1] != NUL)))
-#endif
- )
+ if (skip_status_match_char(xp, s))
++s;
clen += ptr2cells(s);
#ifdef FEAT_MBYTE
diff --git a/src/version.h b/src/version.h
index b6d6137a64..233eb000e9 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 May 19)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 May 19, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 May 20)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 May 20, compiled "