summaryrefslogtreecommitdiffstats
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
parentc1087e64bcfece96de8fa812535154435bbaaba5 (diff)
updated for version 7.0074
-rw-r--r--runtime/doc/eval.txt11
-rw-r--r--runtime/syntax/esterel.vim71
-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
6 files changed, 124 insertions, 25 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 84571bbc45..159f17f00a 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1582,7 +1582,7 @@ serverlist() String get a list of available servers
setbufvar( {expr}, {varname}, {val}) set {varname} in buffer {expr} to {val}
setcmdpos( {pos}) Number set cursor position in command-line
setline( {lnum}, {line}) Number set line {lnum} to {line}
-setqflist( {list} ) Number set list of quickfix items using {list}
+setqflist( {list}[, {action}]) Number set list of quickfix items using {list}
setreg( {n}, {v}[, {opt}]) Number set register to value and type
setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val}
simplify( {filename}) String simplify filename as much as possible
@@ -3604,7 +3604,7 @@ setline({lnum}, {line}) *setline()*
< Note: The '[ and '] marks are not set.
-setqflist({list}) *setqflist()*
+setqflist({list} [, {action}]) *setqflist()*
Creates a quickfix list using the items in {list}. Each item
in {list} is a dictionary. Non-dictionary items in {list} are
ignored. Each dictionary item can contain the following
@@ -3629,6 +3629,13 @@ setqflist({list}) *setqflist()*
If both "pattern" and "lnum" are present then "pattern" will
be used.
+ If {action} is set to 'a', then the items from {list} are
+ added to the existing quickfix list. If there is no existing
+ list, then a new list is created. If {action} is set to 'r',
+ then the items from the current quickfix list are replaced
+ with the items from {list}. If {action} is not present or is
+ set to ' ', then a new list is created.
+
Returns zero for success, -1 for failure.
This function can be used to create a quickfix list
diff --git a/runtime/syntax/esterel.vim b/runtime/syntax/esterel.vim
new file mode 100644
index 0000000000..30383554d2
--- /dev/null
+++ b/runtime/syntax/esterel.vim
@@ -0,0 +1,71 @@
+" Vim syntax file
+" Language: ESTEREL
+" Maintainer: Maurizio Tranchero <mtranchero@yahoo.it>
+" Credits: Luca Necchi <luca.necchi@polito.it>
+" Last Change: Tue May 17 23:49:39 CEST 2005
+" Version: 0.2
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" case is significant
+syn case ignore
+" Esterel Regions
+syn region esterelModule start=/module/ end=/end module/ contains=ALLBUT,esterelModule
+syn region esterelLoop start=/loop/ end=/end loop/ contains=ALLBUT,esterelModule
+syn region esterelAbort start=/abort/ end=/end abort/ contains=ALLBUT,esterelModule
+syn region esterelEvery start=/every/ end=/end every/ contains=ALLBUT,esterelModule
+syn region esterelIf start=/if/ end=/end if/ contains=ALLBUT,esterelModule
+"syn region esterelConcurrent start=/\[/ end=/\]/ contains=ALLBUT,esterelModule
+syn region esterelConcurrent transparent start=/\[/ end=/\]/ contains=ALLBUT,esterelModule
+syn region esterelIfThen start=/if/ end=/then/ oneline
+" and weak abort? how to make vim know that start='weak abort'?
+" Esterel Keywords
+syn keyword esterelStatement module signal end
+syn keyword esterelIO input output
+syn keyword esterelStatement every do loop abort weak
+syn keyword esterelStatement emit present await
+syn keyword esterelStatement if then else
+syn keyword esterelBoolean and or not xor xnor nor nand
+syn keyword esterelOperator \[ \]
+syn keyword esterelPippo pippo
+" Esterel Types
+syn keyword esterelType integer float bolean
+" Esterel Comment
+syn match esterelComment "%.*$"
+" Operators and special characters
+syn match esterelSpecial ":"
+syn match esterelSpecial ";"
+syn match esterelOperator "\["
+syn match esterelOperator "\]"
+syn match esterelOperator ":="
+syn match esterelStatement "\<\(if\|else\)\>"
+syn match esterelNone "\<else\s\+if\>$"
+syn match esterelNone "\<else\s\+if\>\s"
+
+" Class Linking
+if version >= 508 || !exists("did_esterel_syntax_inits")
+ if version < 508
+ let did_esterel_syntax_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ HiLink esterelStatement Statement
+ HiLink esterelType Type
+ HiLink esterelComment Comment
+ HiLink esterelBoolean Number
+ HiLink esterelIO String
+ HiLink esterelOperator Type
+ HiLink esterelSpecial Special
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "esterel"
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 "