Compare commits

...

15 Commits

Author SHA1 Message Date
Bram Moolenaar
194b94c5a8 updated for version 7.2-261 2009-09-18 13:17:09 +00:00
Bram Moolenaar
2db24dc29b updated for version 7.2-260 2009-09-18 12:59:26 +00:00
Bram Moolenaar
5b7880dea2 updated for version 7.2-259 2009-09-11 15:24:31 +00:00
Bram Moolenaar
86c800a1b3 updated for version 7.2-258 2009-09-11 14:48:27 +00:00
Bram Moolenaar
5e69de4421 updated for version 7.2-257 2009-09-11 14:17:54 +00:00
Bram Moolenaar
bef9d835f5 updated for version 7.2-256 2009-09-11 13:46:41 +00:00
Bram Moolenaar
319bdbd5ef updated for version 7.2-255 2009-09-11 13:20:33 +00:00
Bram Moolenaar
c066202665 updated for version 7.2-254 2009-09-11 13:04:24 +00:00
Bram Moolenaar
fa68b0fc1a updated for version 7.2-253 2009-09-11 12:19:51 +00:00
Bram Moolenaar
183bb3e4b6 updated for version 7.2-252 2009-09-11 12:02:34 +00:00
Bram Moolenaar
1d7ad738e5 updated for version 7.2-251 2009-09-11 11:44:54 +00:00
Bram Moolenaar
dc7e00e848 updated for version 7.2-250 2009-09-11 11:26:56 +00:00
Bram Moolenaar
1c6136a8a5 updated for version 7.2-249 2009-09-11 11:00:05 +00:00
Bram Moolenaar
2d6db76d97 updated for version 7.2-248 2009-09-11 10:49:58 +00:00
Bram Moolenaar
e484c94514 updated for version 7.2-247 2009-09-11 10:21:41 +00:00
25 changed files with 191 additions and 44 deletions

View File

@@ -635,7 +635,9 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
}
// Now concatenate
strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1);
strncat(temp, title, BUFSIZE - 1);
temp[BUFSIZE - 1] = '\0';
strncat(temp, title, BUFSIZE - 1 - strlen(temp));
temp[BUFSIZE - 1] = '\0';
InsertMenu(hMenu,
indexMenu++,
MF_STRING|MF_BYPOSITION,

View File

@@ -212,13 +212,34 @@ ifndef MZSCHEME_VER
MZSCHEME_VER = 209_000
endif
ifndef MZSCHEME_PRECISE_GC
MZSCHEME_PRECISE_GC=no
endif
# for version 4.x we need to generate byte-code for Scheme base
ifndef MZSCHEME_GENERATE_BASE
MZSCHEME_GENERATE_BASE=no
endif
ifeq (yes, $(DYNAMIC_MZSCHEME))
DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
else
ifndef MZSCHEME_DLLS
MZSCHEME_DLLS = $(MZSCHEME)
endif
EXTRA_LIBS += -L$(MZSCHEME_DLLS) -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
ifeq (yes,$(MZSCHEME_PRECISE_GC))
MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER)
else
MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
endif
EXTRA_LIBS += -L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)/lib $(MZSCHEME_LIB)
endif
ifeq (yes,$(MZSCHEME_GENERATE_BASE))
DEFINES += -DINCLUDE_MZSCHEME_BASE
MZ_EXTRA_DEP += mzscheme_base.c
endif
ifeq (yes,$(MZSCHEME_PRECISE_GC))
DEFINES += -DMZ_PRECISE_GC
endif
endif
@@ -472,6 +493,9 @@ clean:
-$(DEL) $(EXE) vimrun.exe install.exe uninstal.exe
ifdef PERL
-$(DEL) if_perl.c
endif
ifdef MZSCHEME
-$(DEL) mzscheme_base.c
endif
-$(DEL) pathdef.c
$(MAKE) -C xxd -f Make_cyg.mak clean
@@ -523,9 +547,15 @@ endif
$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_DEP)
$(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP)
$(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o
$(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h
$(RC) $(RCFLAGS) vim.rc -o $(OUTDIR)/vimrc.o
mzscheme_base.c:
$(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
pathdef.c: $(INCL)
ifneq (sh.exe, $(SHELL))
@echo creating pathdef.c

View File

@@ -135,7 +135,7 @@ endif
ifndef MZSCHEME_DLLS
MZSCHEME_DLLS=$(MZSCHEME)
endif
MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS)
MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)\lib
endif
endif
@@ -562,6 +562,9 @@ clean:
-$(DEL) pathdef.c
ifdef PERL
-$(DEL) if_perl.c
endif
ifdef MZSCHEME
-$(DEL) mzscheme_base.c
endif
$(MAKE) -C GvimExt -f Make_ming.mak clean
$(MAKE) -C xxd -f Make_cyg.mak clean

View File

@@ -865,6 +865,7 @@ clean:
- if exist dimm_i.c del dimm_i.c
- if exist dimm.tlb del dimm.tlb
- if exist dosinst.exe del dosinst.exe
- if exist mzscheme_base.c del mzscheme_base.c
cd xxd
$(MAKE) /NOLOGO -f Make_mvc.mak clean
cd ..

2
src/auto/configure vendored
View File

@@ -17135,7 +17135,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:$LINENO: checking whether we need -D_FORTIFY_SOURCE=1" >&5
$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
if test "$gccmajor" -gt "3"; then
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=1"
CFLAGS=`echo "$CFLAGS -D_FORTIFY_SOURCE=1" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' -e 's/-D_FORTIFY_SOURCE=2//g'`
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else

View File

@@ -174,6 +174,11 @@ buf_init_chartab(buf, global)
if (VIM_ISDIGIT(*p))
c = getdigits(&p);
else
#ifdef FEAT_MBYTE
if (has_mbyte)
c = mb_ptr2char_adv(&p);
else
#endif
c = *p++;
c2 = -1;
if (*p == '-' && p[1] != NUL)

View File

@@ -3233,7 +3233,7 @@ if test "$GCC" = yes; then
dnl declared as char x[1] but actually longer. Introduced in gcc 4.0.
AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1)
if test "$gccmajor" -gt "3"; then
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=1"
CFLAGS=`echo "$CFLAGS -D_FORTIFY_SOURCE=1" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' -e 's/-D_FORTIFY_SOURCE=2//g'`
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)

View File

@@ -4568,7 +4568,7 @@ restore_backup:
c = TRUE;
if (write_info.bw_conv_error_lnum != 0)
{
int l = STRLEN(IObuff);
size_t l = STRLEN(IObuff);
vim_snprintf((char *)IObuff + l, IOSIZE - l, _(" in line %ld;"),
(long)write_info.bw_conv_error_lnum);
}
@@ -9498,15 +9498,10 @@ au_exists(arg)
ap = first_autopat[(int)event];
if (ap == NULL)
goto theend;
if (pattern == NULL)
{
retval = TRUE;
goto theend;
}
/* if pattern is "<buffer>", special handling is needed which uses curbuf */
/* for pattern "<buffer=N>, fnamecmp() will work fine */
if (STRICMP(pattern, "<buffer>") == 0)
if (pattern != NULL && STRICMP(pattern, "<buffer>") == 0)
buflocal_buf = curbuf;
/* Check if there is an autocommand with the given pattern. */
@@ -9515,9 +9510,10 @@ au_exists(arg)
/* For buffer-local autocommands, fnamecmp() works fine. */
if (ap->pat != NULL && ap->cmds != NULL
&& (group == AUGROUP_ALL || ap->group == group)
&& (buflocal_buf == NULL
? fnamecmp(ap->pat, pattern) == 0
: ap->buflocal_nr == buflocal_buf->b_fnum))
&& (pattern == NULL
|| (buflocal_buf == NULL
? fnamecmp(ap->pat, pattern) == 0
: ap->buflocal_nr == buflocal_buf->b_fnum)))
{
retval = TRUE;
break;

View File

@@ -1607,11 +1607,11 @@ foldMarkAdjustRecurse(gap, line1, line2, amount, amount_after)
}
else
{
/* 2, 3, or 5: need to correct nested folds too */
foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top,
line2 - fp->fd_top, amount, amount_after);
if (fp->fd_top < top)
{
/* 2 or 3: need to correct nested folds too */
foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top,
line2 - fp->fd_top, amount, amount_after);
if (last <= line2)
{
/* 2. fold contains line1, line2 is below fold */
@@ -1628,7 +1628,11 @@ foldMarkAdjustRecurse(gap, line1, line2, amount, amount_after)
}
else
{
/* 5. fold is below line1 and contains line2 */
/* 5. fold is below line1 and contains line2; need to
* correct nested folds too */
foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top,
line2 - fp->fd_top, amount,
amount_after + (fp->fd_top - top));
if (amount == MAXLNUM)
{
fp->fd_len -= line2 - fp->fd_top + 1;

View File

@@ -860,11 +860,9 @@ gtk_form_main_filter(GdkXEvent *gdk_xevent,
gtk_form_set_static_gravity(GdkWindow *window, gboolean use_static)
{
#ifdef HAVE_GTK2
gboolean static_gravity_supported;
static_gravity_supported = gdk_window_set_static_gravities(window,
use_static);
g_return_if_fail(static_gravity_supported);
/* We don't check if static gravity is actually supported, because it
* results in an annoying assertion error message. */
gdk_window_set_static_gravities(window, use_static);
#else
XSetWindowAttributes xattributes;

View File

@@ -4729,6 +4729,9 @@ gui_mch_font_dialog(char_u *oldval)
if (oldval != NULL && *oldval != NUL)
gtk_font_selection_dialog_set_font_name(
GTK_FONT_SELECTION_DIALOG(gui.fontdlg), (char *)oldval);
else
gtk_font_selection_dialog_set_font_name(
GTK_FONT_SELECTION_DIALOG(gui.fontdlg), DEFAULT_FONT);
if (gui.fontname)
{
@@ -4816,6 +4819,9 @@ gui_mch_font_dialog(char_u *oldval)
if (oldname != oldval)
vim_free(oldname);
}
else
gtk_font_selection_dialog_set_font_name(
GTK_FONT_SELECTION_DIALOG(dialog), DEFAULT_FONT);
response = gtk_dialog_run(GTK_DIALOG(dialog));

View File

@@ -635,8 +635,10 @@ dynamic_mzscheme_end(void)
#endif /* DYNAMIC_MZSCHEME */
/* need to put it here for dynamic stuff to work */
#ifdef INCLUDE_MZSCHEME_BASE
#if defined(INCLUDE_MZSCHEME_BASE)
# include "mzscheme_base.c"
#elif MZSCHEME_VERSION_MAJOR >= 400
# error MzScheme 4.x must include mzscheme_base.c, for MinGW32 you need to define MZSCHEME_GENERATE_BASE=yes
#endif
/*
@@ -875,14 +877,14 @@ startup_mzscheme(void)
#ifdef INCLUDE_MZSCHEME_BASE
{
/*
* versions 4.x do not provide Scheme bindings by defaults
* versions 4.x do not provide Scheme bindings by default
* we need to add them explicitly
*/
Scheme_Object *scheme_base_symbol = NULL;
MZ_GC_DECL_REG(1);
MZ_GC_VAR_IN_REG(0, scheme_base_symbol);
MZ_GC_REG();
/* invoke function from generated and included base.c */
/* invoke function from generated and included mzscheme_base.c */
declare_modules(environment);
scheme_base_symbol = scheme_intern_symbol("scheme/base");
MZ_GC_CHECK();

View File

@@ -1499,7 +1499,8 @@ nb_do_cmd(
return FAIL;
}
first = *pos;
nbdebug((" FIRST POS: line %d, col %d\n", first.lnum, first.col));
nbdebug((" FIRST POS: line %d, col %d\n",
first.lnum, first.col));
pos = off2pos(buf->bufp, off+count-1);
if (!pos)
{
@@ -1510,7 +1511,8 @@ nb_do_cmd(
return FAIL;
}
last = *pos;
nbdebug((" LAST POS: line %d, col %d\n", last.lnum, last.col));
nbdebug((" LAST POS: line %d, col %d\n",
last.lnum, last.col));
del_from_lnum = first.lnum;
del_to_lnum = last.lnum;
doupdate = 1;
@@ -1521,7 +1523,8 @@ nb_do_cmd(
next = off2pos(buf->bufp, off + count);
/* Remove part of the first line. */
if (first.col != 0 || (next != NULL && first.lnum == next->lnum))
if (first.col != 0
|| (next != NULL && first.lnum == next->lnum))
{
if (first.lnum != last.lnum
|| (next != NULL && first.lnum != next->lnum))
@@ -1584,7 +1587,8 @@ nb_do_cmd(
int id = buf_findsign_id(buf->bufp, (linenr_T)i);
if (id > 0)
{
nbdebug((" Deleting sign %d on line %d\n", id, i));
nbdebug((" Deleting sign %d on line %d\n",
id, i));
buf_delsign(buf->bufp, id);
}
else
@@ -1593,7 +1597,8 @@ nb_do_cmd(
}
}
nbdebug((" Deleting lines %d through %d\n", del_from_lnum, del_to_lnum));
nbdebug((" Deleting lines %d through %d\n",
del_from_lnum, del_to_lnum));
curwin->w_cursor.lnum = del_from_lnum;
curwin->w_cursor.col = 0;
del_lines(del_to_lnum - del_from_lnum + 1, FALSE);
@@ -3514,7 +3519,8 @@ get_buf_size(buf_T *bufp)
eol_size = 1;
for (lnum = 1; lnum <= bufp->b_ml.ml_line_count; ++lnum)
{
char_count += (long)STRLEN(ml_get(lnum)) + eol_size;
char_count += (long)STRLEN(ml_get_buf(bufp, lnum, FALSE))
+ eol_size;
/* Check for a CTRL-C every 100000 characters */
if (char_count > last_check)
{

View File

@@ -7430,6 +7430,8 @@ set_bool_option(opt_idx, varp, value, opt_flags)
{
if (curwin->w_p_wrap)
curwin->w_leftcol = 0;
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE;
}
#ifdef FEAT_WINDOWS
@@ -7664,6 +7666,22 @@ set_bool_option(opt_idx, varp, value, opt_flags)
}
#endif
#ifdef FEAT_LINEBREAK
if ((int *)varp == &curwin->w_p_lbr)
{
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE;
}
#endif
#ifdef FEAT_RIGHTLEFT
if ((int *)varp == &curwin->w_p_rl)
{
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE;
}
#endif
/*
* End of handling side effects for bool options.
*/

View File

@@ -23,6 +23,9 @@ func! GetMline()
" remove '%', not used for formatting.
let idline = substitute(idline, "'%'", '', 'g')
" remove '%' used for plural forms.
let idline = substitute(idline, '\\nPlural-Forms: .\+;\\n', '', '')
" remove everything but % items.
return substitute(idline, '[^%]*\(%[-+ #''.0-9*]*l\=[dsuxXpoc%]\)\=', '\1', 'g')
endfunc

View File

@@ -26,7 +26,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test48.out test51.out test53.out test54.out test55.out \
test56.out test57.out test58.out test59.out test60.out \
test61.out test62.out test63.out test64.out test65.out \
test66.out
test66.out test67.out
.SUFFIXES: .in .out
@@ -112,3 +112,4 @@ test63.out: test63.in
test64.out: test64.in
test65.out: test65.in
test66.out: test66.in
test67.out: test67.in

View File

@@ -26,7 +26,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.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 test66.out
test42.out test52.out test65.out test66.out test67.out
SCRIPTS32 = test50.out

View File

@@ -45,7 +45,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.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 test66.out
test42.out test52.out test65.out test66.out test67.out
SCRIPTS32 = test50.out

View File

@@ -26,7 +26,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test48.out test51.out test53.out test54.out test55.out \
test56.out test57.out test58.out test59.out test60.out \
test61.out test62.out test63.out test64.out test65.out \
test66.out
test66.out test67.out
.SUFFIXES: .in .out

View File

@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
# Last change: 2009 Mar 05
# Last change: 2009 Sep 11
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@@ -69,7 +69,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test48.out test51.out test53.out test54.out test55.out \
test56.out test57.out test60.out \
test61.out test62.out test63.out test64.out test65.out \
test66.out
test66.out test67.out
.IFDEF WANT_GUI
SCRIPT_GUI = test16.out

View File

@@ -22,7 +22,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test48.out test49.out test51.out test52.out test53.out \
test54.out test55.out test56.out test57.out test58.out \
test59.out test60.out test61.out test62.out test63.out \
test64.out test65.out test66.out
test64.out test65.out test66.out test67.out
SCRIPTS_GUI = test16.out

33
src/testdir/test67.in Normal file
View File

@@ -0,0 +1,33 @@
Test that groups and patterns are tested correctly when calling exists() for
autocommands.
STARTTEST
:so small.vim
:let results=[]
:augroup auexists
:augroup END
:call add(results, "##BufEnter: " . exists("##BufEnter"))
:call add(results, "#BufEnter: " . exists("#BufEnter"))
:au BufEnter * let g:entered=1
:call add(results, "#BufEnter: " . exists("#BufEnter"))
:call add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter"))
:augroup auexists
:au BufEnter * let g:entered=1
:augroup END
:call add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter"))
:call add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test"))
:au BufEnter *.test let g:entered=1
:call add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test"))
:edit testfile.test
:call add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))
:au BufEnter <buffer> let g:entered=1
:call add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))
:edit testfile2.test
:call add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))
:e test.out
:call append(0, results)
:$d
:w
:qa!
ENDTEST

10
src/testdir/test67.ok Normal file
View File

@@ -0,0 +1,10 @@
##BufEnter: 1
#BufEnter: 0
#BufEnter: 1
#auexists#BufEnter: 0
#auexists#BufEnter: 1
#BufEnter#*.test: 0
#BufEnter#*.test: 1
#BufEnter#<buffer>: 0
#BufEnter#<buffer>: 1
#BufEnter#<buffer>: 0

View File

@@ -3055,18 +3055,17 @@ vcol2col(wp, lnum, vcol)
int vcol;
{
/* try to advance to the specified column */
int col = 0;
int count = 0;
char_u *ptr;
char_u *start;
ptr = ml_get_buf(wp->w_buffer, lnum, FALSE);
start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE);
while (count <= vcol && *ptr != NUL)
{
++col;
count += win_lbr_chartabsize(wp, ptr, count, NULL);
mb_ptr_adv(ptr);
}
return col;
return (int)(ptr - start);
}
#endif

View File

@@ -676,6 +676,36 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
261,
/**/
260,
/**/
259,
/**/
258,
/**/
257,
/**/
256,
/**/
255,
/**/
254,
/**/
253,
/**/
252,
/**/
251,
/**/
250,
/**/
249,
/**/
248,
/**/
247,
/**/
246,
/**/