0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00

updated for version 7.0196

This commit is contained in:
Bram Moolenaar 2006-02-10 23:20:28 +00:00
parent 110bc6bc91
commit c7453f52d4
13 changed files with 225 additions and 70 deletions

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0aa. Last change: 2006 Feb 03 *eval.txt* For Vim version 7.0aa. Last change: 2006 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -3210,6 +3210,8 @@ line({expr}) The result is a Number, which is the line number of the file
$ the last line in the current buffer $ the last line in the current buffer
'x position of mark x (if the mark is not set, 0 is 'x position of mark x (if the mark is not set, 0 is
returned) returned)
w0 first line visible in current window
w$ last line visible in current window
Note that only marks in the current file can be used. Note that only marks in the current file can be used.
Examples: > Examples: >
line(".") line number of the cursor line(".") line number of the cursor

View File

@ -191,13 +191,6 @@ Standard plugins ~
|pi_expl.txt| File explorer |pi_expl.txt| File explorer
LOCAL ADDITIONS: *local-additions* LOCAL ADDITIONS: *local-additions*
|cecutil.txt| DrChip's Utilities Jun 11, 2004
|engspchk.txt| English Spelling Checker (v61) Mar 14, 2005
|example.txt| Example for a locally added help file
|matchit.txt| Extended "%" matching
|test.txt| Testing the hélp cömmånd nôw
|typecorr.txt| Plugin for correcting typing mistakes
|helpp.txt| Dummy line to avoid an error message
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*bars* Bars example *bars* Bars example

View File

@ -208,6 +208,11 @@ The available subcommands are:
USAGE :cs show USAGE :cs show
*:lcscope* *:lcs*
This command is same as the ":cscope" command, except when the
'cscopequickfix' option is set, the location list for the current window is
used instead of the quickfix list to show the cscope results.
*:cstag* *E257* *E562* *:cstag* *E257* *E562*
If you use cscope as well as ctags, |:cstag| allows you to search one or If you use cscope as well as ctags, |:cstag| allows you to search one or
the other before making a jump. For example, you can choose to first the other before making a jump. For example, you can choose to first

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2006 Feb 07 *insert.txt* For Vim version 7.0aa. Last change: 2006 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1072,16 +1072,24 @@ The menu is used when:
- There are at least two matches. - There are at least two matches.
While the menu is displayed these keys have a special meaning: While the menu is displayed these keys have a special meaning:
<CR> and <Enter> Accept the currently selected match <CR> and <Enter> Accept the currently selected match
<Up> Select the previous match, as if CTRL-P was used
<Down> Select the next match, as if CTRL-N was used
<PageUp> Select a match several entries back <PageUp> Select a match several entries back
<PageDown> Select a match several entries further <PageDown> Select a match several entries further
<BS> and CTRL-H Delete one character, find the matches for the shorter word <BS> and CTRL-H Delete one character, find the matches for the shorter word
before the cursor. This may find more matches. before the cursor. This may find more matches.
CTRL-L Add one character from the current match, may reduce the CTRL-L Add one character from the current match, may reduce the
number of matches. Does not work after selecting one of the number of matches. Does not work after selecting one of the
matches with CTRL-N, <Up>, etc. matches with CTRL-N, <Up>, etc.
<Up> Select the previous match, as if CTRL-P was used, but don't
insert it when editing the selection.
<Down> Select the next match, as if CTRL-N was used, but don't
insert it when editing the selection.
The selection is being edited after typing <BS>, CTRL-L or when using the
longest common match. This stops when a match is inserted, as with CTRL-N or
CTRL-P.
The colors of the menu can be changed with these highlight groups: The colors of the menu can be changed with these highlight groups:
Pmenu normal item |hl-Pmenu| Pmenu normal item |hl-Pmenu|

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 02 *options.txt* For Vim version 7.0aa. Last change: 2006 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1621,13 +1621,16 @@ A jump table for the options with a short description can be found at |Q_op|.
'completeopt' 'cot' string (default: "menu") 'completeopt' 'cot' string (default: "menu")
global global
{not in Vi} {not in Vi}
Options for Insert mode completion |ins-completion|. A comma separated list of options for Insert mode completion
Currently the only supported value is: |ins-completion|. The supported values are:
menu Use a popup menu to show the possible completions. The menu Use a popup menu to show the possible completions. The
menu is only shown when there is more than one match and menu is only shown when there is more than one match and
sufficient colors are available. |ins-completion-menu| sufficient colors are available. |ins-completion-menu|
longest Only insert the longest common text of the matches. Use
CTRL-L to add more characters.
*'confirm'* *'cf'* *'noconfirm'* *'nocf'* *'confirm'* *'cf'* *'noconfirm'* *'nocf'*
'confirm' 'cf' boolean (default off) 'confirm' 'cf' boolean (default off)

View File

@ -2124,6 +2124,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:lchdir editing.txt /*:lchdir* :lchdir editing.txt /*:lchdir*
:lcl quickfix.txt /*:lcl* :lcl quickfix.txt /*:lcl*
:lclose quickfix.txt /*:lclose* :lclose quickfix.txt /*:lclose*
:lcs if_cscop.txt /*:lcs*
:lcscope if_cscop.txt /*:lcscope*
:le change.txt /*:le* :le change.txt /*:le*
:left change.txt /*:left* :left change.txt /*:left*
:lefta windows.txt /*:lefta* :lefta windows.txt /*:lefta*
@ -3114,7 +3116,10 @@ Contents quickref.txt /*Contents*
Cscope if_cscop.txt /*Cscope* Cscope if_cscop.txt /*Cscope*
CursorHold autocmd.txt /*CursorHold* CursorHold autocmd.txt /*CursorHold*
CursorHold-example windows.txt /*CursorHold-example* CursorHold-example windows.txt /*CursorHold-example*
CursorHoldI autocmd.txt /*CursorHoldI*
CursorIM mbyte.txt /*CursorIM* CursorIM mbyte.txt /*CursorIM*
CursorMoved autocmd.txt /*CursorMoved*
CursorMovedI autocmd.txt /*CursorMovedI*
D change.txt /*D* D change.txt /*D*
DOS os_dos.txt /*DOS* DOS os_dos.txt /*DOS*
DOS-format editing.txt /*DOS-format* DOS-format editing.txt /*DOS-format*
@ -5422,6 +5427,7 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt* hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help* help various.txt /*help*
help-context help.txt /*help-context* help-context help.txt /*help-context*
help-tags tags 1
help-translated various.txt /*help-translated* help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window* help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt* help.txt help.txt /*help.txt*
@ -5850,6 +5856,14 @@ mapcheck() eval.txt /*mapcheck()*
maple.vim syntax.txt /*maple.vim* maple.vim syntax.txt /*maple.vim*
mapleader map.txt /*mapleader* mapleader map.txt /*mapleader*
maplocalleader map.txt /*maplocalleader* maplocalleader map.txt /*maplocalleader*
mapmode-c map.txt /*mapmode-c*
mapmode-i map.txt /*mapmode-i*
mapmode-ic map.txt /*mapmode-ic*
mapmode-l map.txt /*mapmode-l*
mapmode-n map.txt /*mapmode-n*
mapmode-nvo map.txt /*mapmode-nvo*
mapmode-o map.txt /*mapmode-o*
mapmode-v map.txt /*mapmode-v*
mapping map.txt /*mapping* mapping map.txt /*mapping*
mark motion.txt /*mark* mark motion.txt /*mark*
mark-motions motion.txt /*mark-motions* mark-motions motion.txt /*mark-motions*

6
src/auto/configure vendored
View File

@ -1009,7 +1009,7 @@ gives unlimited permission to copy, distribute and modify it.
_ACEOF _ACEOF
exit 0 exit 0
fi fi
exec 5>config.log exec 5>auto/config.log
cat >&5 <<_ACEOF cat >&5 <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
@ -15455,7 +15455,7 @@ exec 6>&1
# Open the log real soon, to keep \$[0] and so on meaningful, and to # Open the log real soon, to keep \$[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. Logging --version etc. is OK. # values after options handling. Logging --version etc. is OK.
exec 5>>config.log exec 5>>auto/config.log
{ {
echo echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
@ -16285,7 +16285,7 @@ if test "$no_create" != yes; then
ac_config_status_args="$ac_config_status_args --quiet" ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null exec 5>/dev/null
$SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
exec 5>>config.log exec 5>>auto/config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which # Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction. # would make configure fail if this is the last instruction.
$ac_cs_success || { (exit 1); exit 1; } $ac_cs_success || { (exit 1); exit 1; }

View File

@ -95,6 +95,9 @@ static compl_T *compl_shown_match = NULL;
* are used. */ * are used. */
static char_u *compl_leader = NULL; static char_u *compl_leader = NULL;
static int compl_get_longest = FALSE; /* put longest common string
in compl_leader */
static int compl_used_match; /* Selected one of the matches. When static int compl_used_match; /* Selected one of the matches. When
FALSE the match was edited or using FALSE the match was edited or using
the longest common string. */ the longest common string. */
@ -119,6 +122,7 @@ static expand_T compl_xp;
static void ins_ctrl_x __ARGS((void)); static void ins_ctrl_x __ARGS((void));
static int has_compl_option __ARGS((int dict_opt)); static int has_compl_option __ARGS((int dict_opt));
static void ins_compl_longest_match __ARGS((compl_T *match));
static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches)); static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches));
static int ins_compl_make_cyclic __ARGS((void)); static int ins_compl_make_cyclic __ARGS((void));
static void ins_compl_upd_pum __ARGS((void)); static void ins_compl_upd_pum __ARGS((void));
@ -136,7 +140,7 @@ static buf_T *ins_compl_next_buf __ARGS((buf_T *buf, int flag));
static int ins_compl_get_exp __ARGS((pos_T *ini)); static int ins_compl_get_exp __ARGS((pos_T *ini));
static void ins_compl_delete __ARGS((void)); static void ins_compl_delete __ARGS((void));
static void ins_compl_insert __ARGS((void)); static void ins_compl_insert __ARGS((void));
static int ins_compl_next __ARGS((int allow_get_expansion, int count)); static int ins_compl_next __ARGS((int allow_get_expansion, int count, int insert_match));
static int ins_compl_key2dir __ARGS((int c)); static int ins_compl_key2dir __ARGS((int c));
static int ins_compl_pum_key __ARGS((int c)); static int ins_compl_pum_key __ARGS((int c));
static int ins_compl_key2count __ARGS((int c)); static int ins_compl_key2count __ARGS((int c));
@ -683,12 +687,6 @@ edit(cmdchar, startln, count)
#endif #endif
#ifdef FEAT_INS_EXPAND #ifdef FEAT_INS_EXPAND
/* When the popup menu is visible cursor keys change the selection. */
if (c == K_UP && pum_visible())
c = Ctrl_P;
if (c == K_DOWN && pum_visible())
c = Ctrl_N;
/* /*
* Special handling of keys while the popup menu is visible or wanted * Special handling of keys while the popup menu is visible or wanted
* and the cursor is still in the completed word. * and the cursor is still in the completed word.
@ -717,11 +715,19 @@ edit(cmdchar, startln, count)
ins_compl_addleader(c); ins_compl_addleader(c);
continue; continue;
} }
/* Pressing Enter selects the current match. */
if (c == CAR || c == K_KENTER || c == NL)
{
ins_compl_delete();
ins_compl_insert();
}
} }
} }
/* Prepare for or stop CTRL-X mode. This doesn't do completion, but /* Prepare for or stop CTRL-X mode. This doesn't do completion, but
* it does fix up the text when finishing completion. */ * it does fix up the text when finishing completion. */
compl_get_longest = FALSE;
if (c != K_IGNORE && ins_compl_prep(c)) if (c != K_IGNORE && ins_compl_prep(c))
continue; continue;
#endif #endif
@ -1103,6 +1109,10 @@ doESCkey:
break; break;
case K_UP: /* <Up> */ case K_UP: /* <Up> */
#ifdef FEAT_INS_EXPAND
if (pum_visible())
goto docomplete;
#endif
if (mod_mask & MOD_MASK_SHIFT) if (mod_mask & MOD_MASK_SHIFT)
ins_pageup(); ins_pageup();
else else
@ -1120,6 +1130,10 @@ doESCkey:
break; break;
case K_DOWN: /* <Down> */ case K_DOWN: /* <Down> */
#ifdef FEAT_INS_EXPAND
if (pum_visible())
goto docomplete;
#endif
if (mod_mask & MOD_MASK_SHIFT) if (mod_mask & MOD_MASK_SHIFT)
ins_pagedown(); ins_pagedown();
else else
@ -1860,7 +1874,7 @@ ins_ctrl_x()
/* if the next ^X<> won't ADD nothing, then reset /* if the next ^X<> won't ADD nothing, then reset
* compl_cont_status */ * compl_cont_status */
if (compl_cont_status & CONT_N_ADDS) if (compl_cont_status & CONT_N_ADDS)
compl_cont_status = (compl_cont_status | CONT_INTRPT); compl_cont_status |= CONT_INTRPT;
else else
compl_cont_status = 0; compl_cont_status = 0;
/* We're not sure which CTRL-X mode it will be yet */ /* We're not sure which CTRL-X mode it will be yet */
@ -2138,9 +2152,69 @@ ins_compl_add(str, len, fname, extra, cdir, flags)
compl_first_match = match; compl_first_match = match;
compl_curr_match = match; compl_curr_match = match;
/*
* Find the longest common string if still doing that.
*/
if (compl_get_longest && (flags & ORIGINAL_TEXT) == 0)
ins_compl_longest_match(match);
return OK; return OK;
} }
/*
* Reduce the longest common string for match "match".
*/
static void
ins_compl_longest_match(match)
compl_T *match;
{
char_u *p, *s;
int l;
int had_match;
if (compl_leader == NULL)
/* First match, use it as a whole. */
compl_leader = vim_strsave(match->cp_str);
else
{
/* Reduce the text if this match differs from compl_leader. */
for (p = compl_leader, s = match->cp_str; *p != NUL; p += l, s += l)
{
#ifdef FEAT_MBYTE
if (has_mbyte)
{
l = mb_ptr2len(p);
if (STRNCMP(p, s, l) != 0)
break;
}
else
#endif
{
if (*p != *s)
break;
l = 1;
}
}
if (*p != NUL)
{
/* Leader was shortened, need to change the inserted text. */
*p = NUL;
had_match = (curwin->w_cursor.col > compl_col);
ins_compl_delete();
ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
ins_redraw(FALSE);
/* When the match isn't there (to avoid matching itself) remove it
* again after redrawing. */
if (!had_match)
ins_compl_delete();
}
compl_used_match = FALSE;
}
}
/* /*
* Add an array of matches to the list of matches. * Add an array of matches to the list of matches.
* Frees matches[]. * Frees matches[].
@ -2231,7 +2305,7 @@ ins_compl_del_pum()
pum_wanted() pum_wanted()
{ {
/* 'completeopt' must contain "menu" */ /* 'completeopt' must contain "menu" */
if (*p_cot == NUL) if (vim_strchr(p_cot, 'm') == NULL)
return FALSE; return FALSE;
/* The display looks bad on a B&W display. */ /* The display looks bad on a B&W display. */
@ -2762,6 +2836,14 @@ ins_compl_prep(c)
if (c == K_SELECT) if (c == K_SELECT)
return retval; return retval;
/* Set "compl_get_longest" when finding the first matches. */
if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET
|| (ctrl_x_mode == 0 && !compl_started))
{
compl_get_longest = (vim_strchr(p_cot, 'l') != NULL);
compl_used_match = TRUE;
}
if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET) if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET)
{ {
/* /*
@ -3356,7 +3438,7 @@ ins_compl_get_exp(ini)
last_match_pos = *pos; last_match_pos = *pos;
} }
else if (first_match_pos.lnum == last_match_pos.lnum else if (first_match_pos.lnum == last_match_pos.lnum
&& first_match_pos.col == last_match_pos.col) && first_match_pos.col == last_match_pos.col)
found_new_match = FAIL; found_new_match = FAIL;
if (found_new_match == FAIL) if (found_new_match == FAIL)
{ {
@ -3470,9 +3552,10 @@ ins_compl_get_exp(ini)
{ {
if (got_int) if (got_int)
break; break;
/* Fill the popup menu as soon as possible. */
if (pum_wanted() && type != -1) if (pum_wanted() && type != -1)
/* Fill the popup menu as soon as possible. */
ins_compl_check_keys(0); ins_compl_check_keys(0);
if ((ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE) if ((ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE)
|| compl_interrupted) || compl_interrupted)
break; break;
@ -3547,10 +3630,11 @@ ins_compl_insert()
* calls this function with "allow_get_expansion" FALSE. * calls this function with "allow_get_expansion" FALSE.
*/ */
static int static int
ins_compl_next(allow_get_expansion, count) ins_compl_next(allow_get_expansion, count, insert_match)
int allow_get_expansion; int allow_get_expansion;
int count; /* repeat completion this many times; should int count; /* repeat completion this many times; should
be at least 1 */ be at least 1 */
int insert_match; /* Insert the newly selected match */
{ {
int num_matches = -1; int num_matches = -1;
int i; int i;
@ -3558,11 +3642,23 @@ ins_compl_next(allow_get_expansion, count)
compl_T *found_compl = NULL; compl_T *found_compl = NULL;
int found_end = FALSE; int found_end = FALSE;
if (allow_get_expansion) if (compl_leader != NULL
&& (compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0)
{ {
/* Set "compl_shown_match" to the actually shown match, it may differ
* when "compl_leader" is used to omit some of the matches. */
while (STRNCMP(compl_shown_match->cp_str,
compl_leader, STRLEN(compl_leader)) != 0
&& compl_shown_match->cp_next != NULL
&& compl_shown_match->cp_next != compl_first_match)
compl_shown_match = compl_shown_match->cp_next;
}
if (allow_get_expansion && insert_match
&& (!compl_get_longest || compl_used_match))
/* Delete old text to be replaced */ /* Delete old text to be replaced */
ins_compl_delete(); ins_compl_delete();
}
compl_pending = FALSE; compl_pending = FALSE;
/* Repeat this for when <PageUp> or <PageDown> is typed. But don't wrap /* Repeat this for when <PageUp> or <PageDown> is typed. But don't wrap
@ -3615,14 +3711,25 @@ ins_compl_next(allow_get_expansion, count)
} }
} }
/* Insert the text of the new completion */ /* Insert the text of the new completion, or the compl_leader. */
ins_compl_insert(); if (insert_match)
{
if (!compl_get_longest || compl_used_match)
ins_compl_insert();
else
ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
}
else
compl_used_match = FALSE;
if (!allow_get_expansion) if (!allow_get_expansion)
{ {
/* may undisplay the popup menu first */ /* may undisplay the popup menu first */
ins_compl_upd_pum(); ins_compl_upd_pum();
/* redraw to show the user what was inserted */
update_screen(0);
/* display the updated popup menu */ /* display the updated popup menu */
ins_compl_show_pum(); ins_compl_show_pum();
@ -3685,13 +3792,14 @@ ins_compl_check_keys(frequency)
{ {
c = safe_vgetc(); /* Eat the character */ c = safe_vgetc(); /* Eat the character */
compl_shows_dir = ins_compl_key2dir(c); compl_shows_dir = ins_compl_key2dir(c);
(void)ins_compl_next(FALSE, ins_compl_key2count(c)); (void)ins_compl_next(FALSE, ins_compl_key2count(c),
c != K_UP && c != K_DOWN);
} }
else if (c != Ctrl_R) else if (c != Ctrl_R)
compl_interrupted = TRUE; compl_interrupted = TRUE;
} }
if (compl_pending && !got_int) if (compl_pending && !got_int)
(void)ins_compl_next(FALSE, 1); (void)ins_compl_next(FALSE, 1, TRUE);
} }
/* /*
@ -3702,8 +3810,9 @@ ins_compl_check_keys(frequency)
ins_compl_key2dir(c) ins_compl_key2dir(c)
int c; int c;
{ {
if (c == Ctrl_P || c == Ctrl_L || (pum_visible() if (c == Ctrl_P || c == Ctrl_L
&& (c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP))) || (pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP
|| c == K_S_UP || c == K_UP)))
return BACKWARD; return BACKWARD;
return FORWARD; return FORWARD;
} }
@ -3717,7 +3826,8 @@ ins_compl_pum_key(c)
int c; int c;
{ {
return pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP return pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP
|| c == K_PAGEDOWN || c == K_KPAGEDOWN || c == K_S_DOWN); || c == K_PAGEDOWN || c == K_KPAGEDOWN || c == K_S_DOWN
|| c == K_UP || c == K_DOWN);
} }
/* /*
@ -3730,7 +3840,7 @@ ins_compl_key2count(c)
{ {
int h; int h;
if (ins_compl_pum_key(c)) if (ins_compl_pum_key(c) && c != K_UP && c != K_DOWN)
{ {
h = pum_get_height(); h = pum_get_height();
if (h > 3) if (h > 3)
@ -3783,7 +3893,8 @@ ins_complete(c)
* been split because it was longer than 'tw'). if SOL is set then * been split because it was longer than 'tw'). if SOL is set then
* skip the previous pattern, a word at the beginning of the line has * skip the previous pattern, a word at the beginning of the line has
* been inserted, we'll look for that -- Acevedo. */ * been inserted, we'll look for that -- Acevedo. */
if ((compl_cont_status & CONT_INTRPT) && compl_cont_mode == ctrl_x_mode) if ((compl_cont_status & CONT_INTRPT) == CONT_INTRPT
&& compl_cont_mode == ctrl_x_mode)
{ {
/* /*
* it is a continued search * it is a continued search
@ -4129,9 +4240,10 @@ ins_complete(c)
compl_shows_dir = compl_direction; compl_shows_dir = compl_direction;
/* /*
* Find next match. * Find next match (and following matches).
*/ */
n = ins_compl_next(TRUE, ins_compl_key2count(c)); n = ins_compl_next(TRUE, ins_compl_key2count(c),
c != K_UP && c != K_DOWN);
/* may undisplay the popup menu */ /* may undisplay the popup menu */
ins_compl_upd_pum(); ins_compl_upd_pum();

View File

@ -50,7 +50,7 @@ static void cs_file_results __ARGS((FILE *, int *));
static void cs_fill_results __ARGS((char *, int , int *, char ***, static void cs_fill_results __ARGS((char *, int , int *, char ***,
char ***, int *)); char ***, int *));
static int cs_find __ARGS((exarg_T *eap)); static int cs_find __ARGS((exarg_T *eap));
static int cs_find_common __ARGS((char *opt, char *pat, int, int )); static int cs_find_common __ARGS((char *opt, char *pat, int, int, int));
static int cs_help __ARGS((exarg_T *eap)); static int cs_help __ARGS((exarg_T *eap));
static void cs_init __ARGS((void)); static void cs_init __ARGS((void));
static void clear_csinfo __ARGS((int i)); static void clear_csinfo __ARGS((int i));
@ -183,7 +183,8 @@ do_cstag(eap)
case 0 : case 0 :
if (cs_check_for_connections()) if (cs_check_for_connections())
{ {
ret = cs_find_common("g", (char *)(eap->arg), eap->forceit, FALSE); ret = cs_find_common("g", (char *)(eap->arg), eap->forceit, FALSE,
FALSE);
if (ret == FALSE) if (ret == FALSE)
{ {
cs_free_tags(); cs_free_tags();
@ -211,7 +212,7 @@ do_cstag(eap)
if (cs_check_for_connections()) if (cs_check_for_connections())
{ {
ret = cs_find_common("g", (char *)(eap->arg), eap->forceit, ret = cs_find_common("g", (char *)(eap->arg), eap->forceit,
FALSE); FALSE, FALSE);
if (ret == FALSE) if (ret == FALSE)
cs_free_tags(); cs_free_tags();
} }
@ -219,7 +220,8 @@ do_cstag(eap)
} }
else if (cs_check_for_connections()) else if (cs_check_for_connections())
{ {
ret = cs_find_common("g", (char *)(eap->arg), eap->forceit, FALSE); ret = cs_find_common("g", (char *)(eap->arg), eap->forceit, FALSE,
FALSE);
if (ret == FALSE) if (ret == FALSE)
cs_free_tags(); cs_free_tags();
} }
@ -967,7 +969,8 @@ cs_find(eap)
return FALSE; return FALSE;
} }
return cs_find_common(opt, pat, eap->forceit, TRUE); return cs_find_common(opt, pat, eap->forceit, TRUE,
eap->cmdidx == CMD_lcscope);
} /* cs_find */ } /* cs_find */
@ -977,11 +980,12 @@ cs_find(eap)
* common code for cscope find, shared by cs_find() and do_cstag() * common code for cscope find, shared by cs_find() and do_cstag()
*/ */
static int static int
cs_find_common(opt, pat, forceit, verbose) cs_find_common(opt, pat, forceit, verbose, use_ll)
char *opt; char *opt;
char *pat; char *pat;
int forceit; int forceit;
int verbose; int verbose;
int use_ll;
{ {
int i; int i;
char *cmd; char *cmd;
@ -1099,12 +1103,16 @@ cs_find_common(opt, pat, forceit, verbose)
/* fill error list */ /* fill error list */
FILE *f; FILE *f;
char_u *tmp = vim_tempname('c'); char_u *tmp = vim_tempname('c');
qf_info_T *qi = NULL;
win_T *wp = NULL;
f = mch_fopen((char *)tmp, "w"); f = mch_fopen((char *)tmp, "w");
cs_file_results(f, nummatches); cs_file_results(f, nummatches);
fclose(f); fclose(f);
if (use_ll) /* Use location list */
wp = curwin;
/* '-' starts a new error list */ /* '-' starts a new error list */
if (qf_init(NULL, tmp, (char_u *)"%f%*\\t%l%*\\t%m", *qfpos == '-') > 0) if (qf_init(wp, tmp, (char_u *)"%f%*\\t%l%*\\t%m", *qfpos == '-') > 0)
{ {
# ifdef FEAT_WINDOWS # ifdef FEAT_WINDOWS
if (postponed_split != 0) if (postponed_split != 0)
@ -1117,7 +1125,14 @@ cs_find_common(opt, pat, forceit, verbose)
postponed_split = 0; postponed_split = 0;
} }
# endif # endif
qf_jump(NULL, 0, 0, forceit); if (use_ll)
/*
* In the location list window, use the displayed location
* list. Otherwise, use the location list for the window.
*/
qi = (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL) ?
wp->w_llist_ref : wp->w_llist;
qf_jump(qi, 0, 0, forceit);
} }
mch_remove(tmp); mch_remove(tmp);
vim_free(tmp); vim_free(tmp);

View File

@ -2628,7 +2628,7 @@ static char *(p_fdm_values[]) = {"manual", "expr", "marker", "indent", "syntax",
static char *(p_fcl_values[]) = {"all", NULL}; static char *(p_fcl_values[]) = {"all", NULL};
#endif #endif
#ifdef FEAT_INS_EXPAND #ifdef FEAT_INS_EXPAND
static char *(p_cot_values[]) = {"menu", NULL}; static char *(p_cot_values[]) = {"menu", "longest", NULL};
#endif #endif
static void set_option_default __ARGS((int, int opt_flags, int compatible)); static void set_option_default __ARGS((int, int opt_flags, int compatible));

View File

@ -302,7 +302,7 @@
#define LISPWORD_VALUE "defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object" #define LISPWORD_VALUE "defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object"
/* /*
* The following are actual variabables for the options * The following are actual variables for the options
*/ */
#ifdef FEAT_RIGHTLEFT #ifdef FEAT_RIGHTLEFT

View File

@ -125,6 +125,7 @@ static char_u *get_mef_name __ARGS((void));
static buf_T *load_dummy_buffer __ARGS((char_u *fname)); static buf_T *load_dummy_buffer __ARGS((char_u *fname));
static void wipe_dummy_buffer __ARGS((buf_T *buf)); static void wipe_dummy_buffer __ARGS((buf_T *buf));
static void unload_dummy_buffer __ARGS((buf_T *buf)); static void unload_dummy_buffer __ARGS((buf_T *buf));
static qf_info_T *ll_get_or_alloc_list __ARGS((win_T *));
/* Quickfix window check helper macro */ /* Quickfix window check helper macro */
#define IS_QF_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref == NULL) #define IS_QF_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref == NULL)
@ -154,7 +155,11 @@ qf_init(wp, efile, errorformat, newlist)
return FAIL; return FAIL;
if (wp != NULL) if (wp != NULL)
qi = GET_LOC_LIST(wp); {
qi = ll_get_or_alloc_list(wp);
if (qi == NULL)
return FAIL;
}
return qf_init_ext(qi, efile, curbuf, NULL, errorformat, newlist, return qf_init_ext(qi, efile, curbuf, NULL, errorformat, newlist,
(linenr_T)0, (linenr_T)0); (linenr_T)0, (linenr_T)0);
@ -2628,12 +2633,7 @@ ex_make(eap)
if (eap->cmdidx == CMD_lmake || eap->cmdidx == CMD_lgrep if (eap->cmdidx == CMD_lmake || eap->cmdidx == CMD_lgrep
|| eap->cmdidx == CMD_lgrepadd) || eap->cmdidx == CMD_lgrepadd)
{
qi = ll_get_or_alloc_list(curwin);
if (qi == NULL)
return;
wp = curwin; wp = curwin;
}
autowrite_all(); autowrite_all();
fname = get_mef_name(); fname = get_mef_name();
@ -2678,7 +2678,11 @@ ex_make(eap)
(eap->cmdidx != CMD_grepadd (eap->cmdidx != CMD_grepadd
&& eap->cmdidx != CMD_lgrepadd)) > 0 && eap->cmdidx != CMD_lgrepadd)) > 0
&& !eap->forceit) && !eap->forceit)
{
if (wp != NULL)
qi = GET_LOC_LIST(wp);
qf_jump(qi, 0, 0, FALSE); /* display first error */ qf_jump(qi, 0, 0, FALSE); /* display first error */
}
mch_remove(fname); mch_remove(fname);
vim_free(fname); vim_free(fname);
@ -2832,12 +2836,7 @@ ex_cfile(eap)
if (eap->cmdidx == CMD_lfile || eap->cmdidx == CMD_lgetfile if (eap->cmdidx == CMD_lfile || eap->cmdidx == CMD_lgetfile
|| eap->cmdidx == CMD_laddfile) || eap->cmdidx == CMD_laddfile)
{
qi = ll_get_or_alloc_list(curwin);
if (qi == NULL)
return;
wp = curwin; wp = curwin;
}
if (*eap->arg != NUL) if (*eap->arg != NUL)
set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE); set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE);
@ -2856,7 +2855,11 @@ ex_cfile(eap)
&& eap->cmdidx != CMD_laddfile)) > 0 && eap->cmdidx != CMD_laddfile)) > 0
&& (eap->cmdidx == CMD_cfile && (eap->cmdidx == CMD_cfile
|| eap->cmdidx == CMD_lfile)) || eap->cmdidx == CMD_lfile))
{
if (wp != NULL)
qi = GET_LOC_LIST(wp);
qf_jump(qi, 0, 0, eap->forceit); /* display first error */ qf_jump(qi, 0, 0, eap->forceit); /* display first error */
}
} }
/* /*
@ -3517,11 +3520,11 @@ ex_cexpr(eap)
if ((tv->v_type == VAR_STRING && tv->vval.v_string != NULL) if ((tv->v_type == VAR_STRING && tv->vval.v_string != NULL)
|| (tv->v_type == VAR_LIST && tv->vval.v_list != NULL)) || (tv->v_type == VAR_LIST && tv->vval.v_list != NULL))
{ {
if (qf_init_ext(qi, NULL, NULL, tv, p_efm, int expr_cmd = (eap->cmdidx == CMD_cexpr
(eap->cmdidx == CMD_cexpr || eap->cmdidx == CMD_lexpr);
|| eap->cmdidx == CMD_lexpr), if (qf_init_ext(qi, NULL, NULL, tv, p_efm, expr_cmd,
(linenr_T)0, (linenr_T)0) > 0 (linenr_T)0, (linenr_T)0) > 0
&& (eap->cmdidx == CMD_cexpr || eap->cmdidx == CMD_lexpr)) && expr_cmd)
qf_jump(qi, 0, 0, eap->forceit); /* display first error */ qf_jump(qi, 0, 0, eap->forceit); /* display first error */
} }
else else

View File

@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA" #define VIM_VERSION_MEDIUM "7.0aa ALPHA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 9)" #define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 10)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 9, compiled " #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 10, compiled "