Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Someone-Else
Vim
Commits
b11bd7e4
Commit
b11bd7e4
authored
20 years ago
by
Bram Moolenaar
Browse files
Options
Downloads
Patches
Plain Diff
updated for version 7.0049
parent
bee0c5b2
No related branches found
Branches containing commit
Tags
v7.0049
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
runtime/doc/quickfix.txt
+16
-8
16 additions, 8 deletions
runtime/doc/quickfix.txt
src/eval.c
+74
-16
74 additions, 16 deletions
src/eval.c
src/ex_cmds.c
+9
-1
9 additions, 1 deletion
src/ex_cmds.c
with
99 additions
and
25 deletions
runtime/doc/quickfix.txt
+
16
−
8
View file @
b11bd7e4
*quickfix.txt* For Vim version 7.0aa. Last change: 2005
Jan 20
*quickfix.txt* For Vim version 7.0aa. Last change: 2005
Feb 06
VIM REFERENCE MANUAL by Bram Moolenaar
VIM REFERENCE MANUAL by Bram Moolenaar
...
@@ -131,6 +131,10 @@ deleted for some reason, the message "line changed" is shown to warn you that
...
@@ -131,6 +131,10 @@ deleted for some reason, the message "line changed" is shown to warn you that
the error location may not be correct. If you quit Vim and start again the
the error location may not be correct. If you quit Vim and start again the
marks are lost and the error locations may not be correct anymore.
marks are lost and the error locations may not be correct anymore.
If vim is built with |+autocmd| support, two autocommands are available for
running commands before and after a quickfix command (':make', ':grep' and so
on) is executed. See |QuickFixCmdPre| and |QuickFixCmdPost| for details.
=============================================================================
=============================================================================
2. The error window *quickfix-window*
2. The error window *quickfix-window*
...
@@ -220,20 +224,24 @@ lists, use ":cnewer 99" first.
...
@@ -220,20 +224,24 @@ lists, use ":cnewer 99" first.
4. Using :make *:make_makeprg*
4. Using :make *:make_makeprg*
*:mak* *:make*
*:mak* *:make*
:mak[e][!] [arguments] 1. If the 'autowrite' option is on, write any changed
:mak[e][!] [arguments] 1. If vim was built with |+autocmd|, all relevant
|QuickFixCmdPre| autocommands are executed.
2. If the 'autowrite' option is on, write any changed
buffers
buffers
2
. An errorfile name is made from 'makeef'. If
3
. An errorfile name is made from 'makeef'. If
'makeef' doesn't contain "##", and a file with this
'makeef' doesn't contain "##", and a file with this
name already exists, it is deleted.
name already exists, it is deleted.
3
. The program given with the 'makeprg' option is
4
. The program given with the 'makeprg' option is
started (default "make") with the optional
started (default "make") with the optional
[arguments] and the output is saved in the
[arguments] and the output is saved in the
errorfile (for Unix it is also echoed on the
errorfile (for Unix it is also echoed on the
screen).
screen).
4. The errorfile is read using 'errorformat'.
5. The errorfile is read using 'errorformat'.
5. If [!] is not given the first error is jumped to.
6. If [!] is not given the first error is jumped to.
6. The errorfile is deleted.
7. The errorfile is deleted.
7. You can now move through the errors with commands
8. If vim was built with |+autocmd|, all relevant
|QuickFixCmdPost| autocommands are executed.
9. You can now move through the errors with commands
like |:cnext| and |:cprevious|, see above.
like |:cnext| and |:cprevious|, see above.
This command does not accept a comment, any "
This command does not accept a comment, any "
characters are considered part of the arguments.
characters are considered part of the arguments.
...
...
This diff is collapsed.
Click to expand it.
src/eval.c
+
74
−
16
View file @
b11bd7e4
...
@@ -571,6 +571,8 @@ static void list_func_head __ARGS((ufunc_T *fp, int indent));
...
@@ -571,6 +571,8 @@ static void list_func_head __ARGS((ufunc_T *fp, int indent));
static void cat_func_name __ARGS((char_u *buf, ufunc_T *fp));
static void cat_func_name __ARGS((char_u *buf, ufunc_T *fp));
static ufunc_T *find_func __ARGS((char_u *name));
static ufunc_T *find_func __ARGS((char_u *name));
static int function_exists __ARGS((char_u *name));
static int function_exists __ARGS((char_u *name));
static int builtin_function __ARGS((char_u *name));
static int func_autoload __ARGS((char_u *name));
static void func_free __ARGS((ufunc_T *fp));
static void func_free __ARGS((ufunc_T *fp));
static void func_unref __ARGS((char_u *name));
static void func_unref __ARGS((char_u *name));
static void func_ref __ARGS((char_u *name));
static void func_ref __ARGS((char_u *name));
...
@@ -2495,7 +2497,10 @@ ex_call(eap)
...
@@ -2495,7 +2497,10 @@ ex_call(eap)
if (*startarg != '(')
if (*startarg != '(')
{
{
EMSG2(_("E107: Missing braces: %s"), name);
if (*name == K_SPECIAL)
EMSG2(_("E107: Missing braces: <SNR>%s"), name + 3);
else
EMSG2(_("E107: Missing braces: %s"), name);
goto end;
goto end;
}
}
...
@@ -2984,7 +2989,7 @@ get_user_var_name(xp, idx)
...
@@ -2984,7 +2989,7 @@ get_user_var_name(xp, idx)
ht = &curwin->w_vars.dv_hashtab;
ht = &curwin->w_vars.dv_hashtab;
if (wdone < ht->ht_used)
if (wdone < ht->ht_used)
{
{
if (
b
done++ == 0)
if (
w
done++ == 0)
hi = ht->ht_array;
hi = ht->ht_array;
else
else
++hi;
++hi;
...
@@ -6139,24 +6144,31 @@ call_func(name, len, rettv, argcount, argvars, firstline, lastline,
...
@@ -6139,24 +6144,31 @@ call_func(name, len, rettv, argcount, argvars, firstline, lastline,
rettv->v_type = VAR_NUMBER; /* default is number rettv */
rettv->v_type = VAR_NUMBER; /* default is number rettv */
error = ERROR_UNKNOWN;
error = ERROR_UNKNOWN;
if (!
ASCII_ISLOWER
(fname
[0]
))
if (!
builtin_function
(fname))
{
{
/*
/*
* User defined function.
* User defined function.
*/
*/
fp = find_func(fname);
fp = find_func(fname);
#ifdef FEAT_AUTOCMD
#ifdef FEAT_AUTOCMD
if (fp == NULL && apply_autocmds(EVENT_FUNCUNDEFINED,
/* Trigger FuncUndefined event, may load the function. */
fname, fname, TRUE, NULL)
if (fp == NULL
#ifdef FEAT_EVAL
&& apply_autocmds(EVENT_FUNCUNDEFINED,
&& !aborting()
fname, fname, TRUE, NULL)
#endif
&& !aborting())
)
{
{
/* executed an autocommand, search for function again */
/* executed an autocommand, search for
the
function again */
fp = find_func(fname);
fp = find_func(fname);
}
}
#endif
#endif
/* Try loading a package. */
if (fp == NULL && func_autoload(fname) && !aborting())
{
/* loaded a package, search for the function again */
fp = find_func(fname);
}
if (fp != NULL)
if (fp != NULL)
{
{
if (fp->flags & FC_RANGE)
if (fp->flags & FC_RANGE)
...
@@ -15375,10 +15387,9 @@ trans_function_name(pp, skip, flags, fdp)
...
@@ -15375,10 +15387,9 @@ trans_function_name(pp, skip, flags, fdp)
lead += (int)STRLEN(sid_buf);
lead += (int)STRLEN(sid_buf);
}
}
}
}
else if (!(flags & TFN_INT) &&
!ASCII_ISUPPER(*
lv.ll_name))
else if (!(flags & TFN_INT) &&
builtin_function(
lv.ll_name))
{
{
EMSG2(_("E128: Function name must start with a capital: %s"),
EMSG2(_("E128: Function name must start with a capital or contain a colon: %s"), lv.ll_name);
lv.ll_name);
goto theend;
goto theend;
}
}
name = alloc((unsigned)(len + lead + 1));
name = alloc((unsigned)(len + lead + 1));
...
@@ -15496,15 +15507,62 @@ function_exists(name)
...
@@ -15496,15 +15507,62 @@ function_exists(name)
p = trans_function_name(&p, FALSE, TFN_INT|TFN_QUIET, NULL);
p = trans_function_name(&p, FALSE, TFN_INT|TFN_QUIET, NULL);
if (p != NULL)
if (p != NULL)
{
{
if (ASCII_ISUPPER(*p) || p[0] == K_SPECIAL)
if (builtin_function(p))
n = (find_func(p) != NULL);
else if (ASCII_ISLOWER(*p))
n = (find_internal_func(p) >= 0);
n = (find_internal_func(p) >= 0);
else
n = (find_func(p) != NULL);
vim_free(p);
vim_free(p);
}
}
return n;
return n;
}
}
/*
* Return TRUE if "name" looks like a builtin function name: starts with a
* lower case letter and doesn't contain a ':'.
*/
static int
builtin_function(name)
char_u *name;
{
return ASCII_ISLOWER(name[0]) && vim_strchr(name, ':') == NULL;
}
/*
* If "name" has a package name try autoloading the script.
* Return TRUE if a package was loaded.
*/
static int
func_autoload(name)
char_u *name;
{
char_u *p;
char_u *scriptname;
int ret = FALSE;
/* If there is no colon after name[1] there is no package name. */
p = vim_strchr(name, ':');
if (p == NULL || p <= name + 2)
return FALSE;
/* Get the script file name: replace ':' with '/', append ".vim". */
scriptname = alloc((unsigned)(STRLEN(name) + 14));
if (scriptname == NULL)
return FALSE;
STRCPY(scriptname, "autoload/");
STRCAT(scriptname, name);
*vim_strrchr(scriptname, ':') = NUL;
STRCAT(scriptname, ".vim");
while ((p = vim_strchr(scriptname, ':')) != NULL)
*p = '/';
/* Try loading the package from $VIMRUNTIME/autoload/<name>.vim */
if (cmd_runtime(scriptname, FALSE) == OK)
ret = TRUE;
vim_free(scriptname);
return ret;
}
#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
/*
/*
...
...
This diff is collapsed.
Click to expand it.
src/ex_cmds.c
+
9
−
1
View file @
b11bd7e4
...
@@ -3534,6 +3534,7 @@ do_sub(eap)
...
@@ -3534,6 +3534,7 @@ do_sub(eap)
long
nmatch
;
/* number of lines in match */
long
nmatch
;
/* number of lines in match */
linenr_T
sub_firstlnum
;
/* nr of first sub line */
linenr_T
sub_firstlnum
;
/* nr of first sub line */
char_u
*
sub_firstline
;
/* allocated copy of first sub line */
char_u
*
sub_firstline
;
/* allocated copy of first sub line */
int
endcolumn
;
/* put cursor in last column when done */
cmd
=
eap
->
arg
;
cmd
=
eap
->
arg
;
if
(
!
global_busy
)
if
(
!
global_busy
)
...
@@ -3623,6 +3624,10 @@ do_sub(eap)
...
@@ -3623,6 +3624,10 @@ do_sub(eap)
}
}
pat
=
NULL
;
/* search_regcomp() will use previous pattern */
pat
=
NULL
;
/* search_regcomp() will use previous pattern */
sub
=
old_sub
;
sub
=
old_sub
;
/* Vi compatibility quirk: repeating with ":s" keeps the cursor in the
* last column after using "$". */
endcolumn
=
(
curwin
->
w_curswant
==
MAXCOL
);
}
}
/*
/*
...
@@ -4261,7 +4266,10 @@ outofmem:
...
@@ -4261,7 +4266,10 @@ outofmem:
if
(
!
global_busy
)
if
(
!
global_busy
)
{
{
beginline
(
BL_WHITE
|
BL_FIX
);
if
(
endcolumn
)
coladvance
((
colnr_T
)
MAXCOL
);
else
beginline
(
BL_WHITE
|
BL_FIX
);
if
(
!
do_sub_msg
()
&&
do_ask
)
if
(
!
do_sub_msg
()
&&
do_ask
)
MSG
(
""
);
MSG
(
""
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment