Compare commits

...

10 Commits

Author SHA1 Message Date
Bram Moolenaar
2161bd8dc1 updated for version 7.2-027 2008-11-06 09:23:57 +00:00
Bram Moolenaar
9fd01c6ab8 updated for version 7.2-026 2008-11-01 12:52:38 +00:00
Bram Moolenaar
d9205ca1fd updated for version 7.2-025 2008-10-02 20:55:54 +00:00
Bram Moolenaar
991e10f3c7 updated for version 7.2-024 2008-10-02 20:48:41 +00:00
Bram Moolenaar
85595c5815 updated for version 7.2-023 2008-10-02 16:04:05 +00:00
Bram Moolenaar
34b6cb1209 updated for version 7.2-022 2008-09-20 14:27:03 +00:00
Bram Moolenaar
f6dad43c98 updated for version 7.2-021 2008-09-18 19:29:58 +00:00
Bram Moolenaar
806875ddb5 updated for version 7.2-020 2008-09-18 18:57:10 +00:00
Bram Moolenaar
ca9f958114 updated for version 7.2-019 2008-09-18 10:44:28 +00:00
Bram Moolenaar
da2bd6ff50 updated for version 7.2-018 2008-09-14 19:41:30 +00:00
12 changed files with 173 additions and 13 deletions

View File

@@ -285,6 +285,7 @@ SRC_DOS = \
src/proto/os_win32.pro \
src/proto/os_mswin.pro \
src/testdir/Make_dos.mak \
src/testdir/Make_ming.mak \
src/testdir/dos.vim \
src/uninstal.c \
src/vim.def \

View File

@@ -5059,6 +5059,7 @@ skip:
if (did_sub)
++sub_nlines;
vim_free(new_start); /* for when substitute was cancelled */
vim_free(sub_firstline); /* free the copy of the original line */
sub_firstline = NULL;
}

View File

@@ -278,7 +278,7 @@ EX(CMD_cquit, "cquit", ex_cquit,
EX(CMD_crewind, "crewind", ex_cc,
RANGE|NOTADR|COUNT|TRLBAR|BANG),
EX(CMD_cscope, "cscope", do_cscope,
EXTRA|NOTRLCOM|SBOXOK|XFILE),
EXTRA|NOTRLCOM|XFILE),
EX(CMD_cstag, "cstag", do_cstag,
BANG|TRLBAR|WORD1),
EX(CMD_cunmap, "cunmap", ex_unmap,
@@ -506,7 +506,7 @@ EX(CMD_lchdir, "lchdir", ex_cd,
EX(CMD_lclose, "lclose", ex_cclose,
RANGE|NOTADR|COUNT|TRLBAR),
EX(CMD_lcscope, "lcscope", do_cscope,
EXTRA|NOTRLCOM|SBOXOK|XFILE),
EXTRA|NOTRLCOM|XFILE),
EX(CMD_left, "left", ex_align,
TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
EX(CMD_leftabove, "leftabove", ex_wrongmodifier,
@@ -635,6 +635,8 @@ EX(CMD_nnoremenu, "nnoremenu", ex_menu,
RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_noremap, "noremap", ex_map,
BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_noautocmd, "noautocmd", ex_wrongmodifier,
NEEDARG|EXTRA|NOTRLCOM),
EX(CMD_nohlsearch, "nohlsearch", ex_nohlsearch,
TRLBAR|SBOXOK|CMDWIN),
EX(CMD_noreabbrev, "noreabbrev", ex_abbreviate,
@@ -651,6 +653,8 @@ EX(CMD_nunmenu, "nunmenu", ex_menu,
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_open, "open", ex_open,
RANGE|EXTRA),
EX(CMD_oldfiles, "oldfiles", ex_oldfiles,
BANG|TRLBAR|SBOXOK|CMDWIN),
EX(CMD_omap, "omap", ex_map,
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_omapclear, "omapclear", ex_mapclear,
@@ -802,7 +806,7 @@ EX(CMD_scriptnames, "scriptnames", ex_scriptnames,
EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding,
WORD1|TRLBAR|CMDWIN),
EX(CMD_scscope, "scscope", do_scscope,
EXTRA|NOTRLCOM|SBOXOK),
EXTRA|NOTRLCOM),
EX(CMD_set, "set", ex_set,
TRLBAR|EXTRA|CMDWIN|SBOXOK),
EX(CMD_setfiletype, "setfiletype", ex_setfiletype,

View File

@@ -2978,6 +2978,7 @@ static struct cmdmod
{"keepmarks", 3, FALSE},
{"leftabove", 5, FALSE},
{"lockmarks", 3, FALSE},
{"noautocmd", 3, FALSE},
{"rightbelow", 6, FALSE},
{"sandbox", 3, FALSE},
{"silent", 3, FALSE},
@@ -9541,6 +9542,15 @@ eval_vars(src, srcstart, usedlen, lnump, errormsg, escaped)
#ifdef FEAT_AUTOCMD
case SPEC_AFILE: /* file name for autocommand */
result = autocmd_fname;
if (result != NULL && !autocmd_fname_full)
{
/* Still need to turn the fname into a full path. It is
* postponed to avoid a delay when <afile> is not used. */
autocmd_fname_full = TRUE;
result = FullName_save(autocmd_fname, FALSE);
vim_free(autocmd_fname);
autocmd_fname = result;
}
if (result == NULL)
{
*errormsg = (char_u *)_("E495: no autocommand file name to substitute for \"<afile>\"");

View File

@@ -8523,6 +8523,7 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap)
char_u *save_sourcing_name;
linenr_T save_sourcing_lnum;
char_u *save_autocmd_fname;
int save_autocmd_fname_full;
int save_autocmd_bufnr;
char_u *save_autocmd_match;
int save_autocmd_busy;
@@ -8601,6 +8602,7 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap)
* Save the autocmd_* variables and info about the current buffer.
*/
save_autocmd_fname = autocmd_fname;
save_autocmd_fname_full = autocmd_fname_full;
save_autocmd_bufnr = autocmd_bufnr;
save_autocmd_match = autocmd_match;
save_autocmd_busy = autocmd_busy;
@@ -8618,14 +8620,15 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap)
if (fname != NULL && *fname != NUL)
autocmd_fname = fname;
else if (buf != NULL)
autocmd_fname = buf->b_fname;
autocmd_fname = buf->b_ffname;
else
autocmd_fname = NULL;
}
else
autocmd_fname = fname_io;
if (autocmd_fname != NULL)
autocmd_fname = FullName_save(autocmd_fname, FALSE);
autocmd_fname = vim_strsave(autocmd_fname);
autocmd_fname_full = FALSE; /* call FullName_save() later */
/*
* Set the buffer number to be used for <abuf>.
@@ -8810,6 +8813,7 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap)
sourcing_lnum = save_sourcing_lnum;
vim_free(autocmd_fname);
autocmd_fname = save_autocmd_fname;
autocmd_fname_full = save_autocmd_fname_full;
autocmd_bufnr = save_autocmd_bufnr;
autocmd_match = save_autocmd_match;
#ifdef FEAT_EVAL
@@ -8918,7 +8922,7 @@ auto_next_pat(apc, stop_at_last)
{
apc->curpat = NULL;
/* only use a pattern when it has not been removed, has commands and
/* Only use a pattern when it has not been removed, has commands and
* the group matches. For buffer-local autocommands only check the
* buffer number. */
if (ap->pat != NULL && ap->cmds != NULL

View File

@@ -1022,6 +1022,7 @@ EXTERN char_u *new_last_cmdline INIT(= NULL); /* new value for last_cmdline */
#endif
#ifdef FEAT_AUTOCMD
EXTERN char_u *autocmd_fname INIT(= NULL); /* fname for <afile> on cmdline */
EXTERN int autocmd_fname_full; /* autocmd_fname is full path */
EXTERN int autocmd_bufnr INIT(= 0); /* fnum for <abuf> on cmdline */
EXTERN char_u *autocmd_match INIT(= NULL); /* name for <amatch> on cmdline */
EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */

View File

@@ -1457,7 +1457,8 @@ parse_command_name(parmp)
++initstr;
}
if (TOLOWER_ASC(initstr[0]) == 'g' || initstr[0] == 'k')
/* "gvim" starts the GUI. Also accept "Gvim" for MS-Windows. */
if (TOLOWER_ASC(initstr[0]) == 'g')
{
main_start_gui();
#ifdef FEAT_GUI

View File

@@ -183,6 +183,8 @@ static void nv_drop __ARGS((cmdarg_T *cap));
static void nv_cursorhold __ARGS((cmdarg_T *cap));
#endif
static char *e_noident = N_("E349: No identifier under cursor");
/*
* Function to be called for a Normal or Visual mode command.
* The argument is a cmdarg_T.
@@ -1132,7 +1134,8 @@ getcount:
out_flush();
#endif
#ifdef FEAT_AUTOCMD
did_cursorhold = FALSE;
if (ca.cmdchar != K_IGNORE)
did_cursorhold = FALSE;
#endif
State = NORMAL;
@@ -3509,7 +3512,7 @@ find_ident_at_pos(wp, lnum, startcol, string, find_type)
if (find_type & FIND_STRING)
EMSG(_("E348: No string under cursor"));
else
EMSG(_("E349: No identifier under cursor"));
EMSG(_(e_noident));
return 0;
}
ptr += col;
@@ -5471,8 +5474,17 @@ nv_ident(cap)
{
/* An external command will probably use an argument starting
* with "-" as an option. To avoid trouble we skip the "-". */
while (*ptr == '-')
while (*ptr == '-' && n > 0)
{
++ptr;
--n;
}
if (n == 0)
{
EMSG(_(e_noident)); /* found dashes only */
vim_free(buf);
return;
}
/* When a count is given, turn it into a range. Is this
* really what we want? */
@@ -5519,7 +5531,9 @@ nv_ident(cap)
if (cmdchar == 'K' && !kp_help)
{
/* Escape the argument properly for a shell command */
ptr = vim_strnsave(ptr, n);
p = vim_strsave_shellescape(ptr, TRUE);
vim_free(ptr);
if (p == NULL)
{
vim_free(buf);

View File

@@ -7974,6 +7974,11 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
else /* curwin->w_p_scr > curwin->w_height */
curwin->w_p_scr = curwin->w_height;
}
if (p_hi < 0)
{
errmsg = e_positive;
p_hi = 0;
}
if (p_report < 0)
{
errmsg = e_positive;

View File

@@ -2439,9 +2439,17 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
#ifdef FEAT_SYN_HL
/* Show 'cursorcolumn' in the fold line. */
if (wp->w_p_cuc && (int)wp->w_virtcol + txtcol < W_WIDTH(wp))
ScreenAttrs[off + wp->w_virtcol + txtcol] = hl_combine_attr(
ScreenAttrs[off + wp->w_virtcol + txtcol], hl_attr(HLF_CUC));
if (wp->w_p_cuc)
{
txtcol += wp->w_virtcol;
if (wp->w_p_wrap)
txtcol -= wp->w_skipcol;
else
txtcol -= wp->w_leftcol;
if (txtcol >= 0 && txtcol < W_WIDTH(wp))
ScreenAttrs[off + txtcol] = hl_combine_attr(
ScreenAttrs[off + txtcol], hl_attr(HLF_CUC));
}
#endif
SCREEN_LINE(row + W_WINROW(wp), W_WINCOL(wp), (int)W_WIDTH(wp),

91
src/testdir/Make_ming.mak Normal file
View File

@@ -0,0 +1,91 @@
# Makefile to run tests for Vim, on Dos-like machines
# with sh.exe or zsh.exe in the path or not.
#
# Author: Bill McCarthy
#
# Note that test54 has been removed until it is fixed.
#
# Requires a set of Unix tools: echo, diff, etc.
ifneq (sh.exe, $(SHELL))
DEL = rm -f
MV = mv
CP = cp
DIRSLASH = /
else
DEL = del
MV = rename
CP = copy
DIRSLASH = \\
endif
VIMPROG = ..$(DIRSLASH)vim
# Omitted:
# test2 "\\tmp" doesn't work.
# test10 'errorformat' is different
# test12 can't unlink a swap file
# test25 uses symbolic link
# test27 can't edit file with "*" in file name
# test31 16 bit version runs out of memory...
SCRIPTS16 = test1.out test19.out test20.out test22.out \
test23.out test24.out test28.out test29.out \
test35.out test36.out test43.out \
test44.out test45.out test46.out test47.out \
test48.out test51.out test53.out \
test55.out test56.out test57.out test58.out test59.out \
test60.out test61.out test62.out test63.out test64.out
# Had to remove test54 which doesn't work yet.
# test54.out
SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test8.out test9.out test11.out test13.out test14.out \
test15.out test17.out test18.out test21.out test26.out \
test30.out test31.out test32.out test33.out test34.out \
test37.out test38.out test39.out test40.out test41.out \
test42.out test52.out test65.out
SCRIPTS32 = test50.out
SCRIPTS_GUI = test16.out
.SUFFIXES: .in .out
vimall: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS32)
echo ALL DONE
nongui: fixff $(SCRIPTS16) $(SCRIPTS)
echo ALL DONE
small:
echo ALL DONE
gui: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI)
echo ALL DONE
win32: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32)
echo ALL DONE
fixff:
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
clean:
-$(DEL) *.out
-$(DEL) test.ok
-$(DEL) small.vim
-$(DEL) tiny.vim
-$(DEL) mbyte.vim
-$(DEL) X*
-$(DEL) viminfo
.in.out:
$(CP) $*.ok test.ok
$(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in
diff test.out $*.ok
-$(DEL) $*.out
$(MV) test.out $*.out
-$(DEL) X*
-$(DEL) test.ok
-$(DEL) viminfo

View File

@@ -676,6 +676,26 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
27,
/**/
26,
/**/
25,
/**/
24,
/**/
23,
/**/
22,
/**/
21,
/**/
20,
/**/
19,
/**/
18,
/**/
17,
/**/