Compare commits

...

7 Commits

Author SHA1 Message Date
Bram Moolenaar
c271c48e80 updated for version 7.3.623
Problem:    Perl 5.14 commands crash Vim on MS-Windows.
Solution:   Use perl_get_sv() instead of GvSV(). (Raymond Ko)
2012-08-08 13:17:31 +02:00
Bram Moolenaar
e66822e3d1 updated for version 7.3.622
Problem:    XPM library for Win32 can't be found.
Solution:   Suggest using the one from the Vim ftp site.
2012-08-02 21:48:24 +02:00
Bram Moolenaar
09168a77e4 updated for version 7.3.621
Problem:    Compiler warnings on 64 bit windows.
Solution:   Add type casts. (Mike Williams)
2012-08-02 21:24:42 +02:00
Bram Moolenaar
da3cb831e9 updated for version 7.3.620
Problem:    Building with recent Ruby on Win32 doesn't work.
Solution:   Add a separate argument for the API version. (Yasuhiro Matsumoto)
2012-08-02 21:21:47 +02:00
Bram Moolenaar
e4195c5d84 updated for version 7.3.619
Problem:    When executing a shell command Vim may become slow to respond.
Solution:   Don't wait after every processed message. (idea by Yasuhiro
            Matsumoto)
2012-08-02 12:31:44 +02:00
Bram Moolenaar
8a0f3c78fe updated for version 7.3.618
Problem:    Still doesn't compile with small features.
Solution:   Move current_search() out of #ifdef. (Dominique Pelle)
2012-07-29 12:55:32 +02:00
Bram Moolenaar
a07c831bef updated for version 7.3.617
Problem:    Hang on completion.
Solution:   Skip over the space. (Yasuhiro Matsumoto)
2012-07-27 21:12:07 +02:00
8 changed files with 207 additions and 164 deletions

View File

@@ -260,7 +260,9 @@ endif
# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
# RUBY_VER=[Ruby version, eg 16, 17] (default is 16)
# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.6)
# You must set RUBY_VER_LONG when change RUBY_VER.
# You must set RUBY_VER_LONG when changing RUBY_VER.
# You must set RUBY_API_VER version to RUBY_VER_LONG.
# Don't set ruby API version to RUBY_VER like 191.
#RUBY=c:/ruby
ifdef RUBY
ifndef DYNAMIC_RUBY
@@ -273,6 +275,9 @@ endif
ifndef RUBY_VER_LONG
RUBY_VER_LONG = 1.6
endif
ifndef RUBY_API_VER
RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
endif
ifndef RUBY_PLATFORM
ifeq ($(RUBY_VER), 16)
@@ -288,9 +293,9 @@ endif
ifndef RUBY_INSTALL_NAME
ifeq ($(RUBY_VER), 16)
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
else
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
endif
endif

View File

@@ -63,6 +63,8 @@
# RUBY_VER=[Ruby version, eg 16, 17] (default is 18)
# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8)
# You must set RUBY_VER_LONG when change RUBY_VER.
# You must set RUBY_API_VER to RUBY_VER_LONG.
# Don't set ruby API version to RUBY_VER like 191.
#
# Tcl interface:
# TCL=[Path to Tcl directory]
@@ -279,7 +281,11 @@ NETBEANS_LIB = WSock32.lib
!ifdef XPM
# XPM - Include support for XPM signs
# you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
# You need to download or build xpm.lib somehow.
# You can get the most recent version of libXpm-*.zip from
# http://cgit.freedesktop.org/xorg/lib/libXpm
# from which you must build xpm.lib yourself
# OR get and unpack: ftp://ftp.vim.org/pub/vim/pcextra/xpm.zip
XPM_OBJ = $(OBJDIR)/xpm_w32.obj
XPM_DEFS = -DFEAT_XPM_W32
XPM_LIB = $(XPM)\lib\libXpm.lib
@@ -807,28 +813,31 @@ RUBY_VER = 18
!ifndef RUBY_VER_LONG
RUBY_VER_LONG = 1.8
!endif
!ifndef RUBY_API_VER
RUBY_API_VER = $(RUBY_VER_LONG:.=)
!endif
!if $(RUBY_VER) >= 18
!ifndef RUBY_PLATFORM
RUBY_PLATFORM = i386-mswin32
!endif
!ifndef RUBY_INSTALL_NAME
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
!endif
!else
!ifndef RUBY_PLATFORM
RUBY_PLATFORM = i586-mswin32
!endif
!ifndef RUBY_INSTALL_NAME
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
!endif
!endif # $(RUBY_VER) >= 18
!message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
CFLAGS = $(CFLAGS) -DFEAT_RUBY
RUBY_OBJ = $(OUTDIR)\if_ruby.obj
!if $(RUBY_VER) >= 190
RUBY_INC = /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)"
!if $(RUBY_VER) >= 19
RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
!else
RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
!endif

View File

@@ -3392,7 +3392,7 @@ set_one_cmd_context(xp, buff)
/* Find start of last argument (argument just before cursor): */
p = buff;
xp->xp_pattern = p;
len = STRLEN(buff);
len = (int)STRLEN(buff);
while (*p && p < buff + len)
{
if (*p == ' ' || *p == TAB)
@@ -3837,16 +3837,11 @@ set_one_cmd_context(xp, buff)
while (*p)
{
if (*p == ' ')
{
/* argument starts after a space */
arg = p + 1;
}
else
{
if (*p == '\\' && *(p + 1) != NUL)
++p; /* skip over escaped character */
mb_ptr_adv(p);
}
else if (*p == '\\' && *(p + 1) != NUL)
++p; /* skip over escaped character */
mb_ptr_adv(p);
}
xp->xp_pattern = arg;
}

View File

@@ -76,6 +76,12 @@
# define EXTERN_C
#endif
#if (PERL_REVISION == 5) && (PERL_VERSION >= 14) && defined(_MSC_VER)
/* Using PL_errgv to get the error message after perl_eval_sv() causes a crash
* with MSVC and Perl version 5.14. */
# define AVOID_PL_ERRGV
#endif
/* Compatibility hacks over */
static PerlInterpreter *perl_interp = NULL;
@@ -796,7 +802,11 @@ ex_perl(eap)
SvREFCNT_dec(sv);
#ifdef AVOID_PL_ERRGV
err = SvPV(perl_get_sv("@", GV_ADD), length);
#else
err = SvPV(GvSV(PL_errgv), length);
#endif
FREETMPS;
LEAVE;
@@ -866,7 +876,11 @@ ex_perldo(eap)
sv_catpvn(sv, "}", 1);
perl_eval_sv(sv, G_DISCARD | G_NOARGS);
SvREFCNT_dec(sv);
#ifdef AVOID_PL_ERRGV
str = SvPV(perl_get_sv("@", GV_ADD), length);
#else
str = SvPV(GvSV(PL_errgv), length);
#endif
if (length)
goto err;
@@ -880,7 +894,11 @@ ex_perldo(eap)
sv_setpv(GvSV(PL_defgv), (char *)ml_get(i));
PUSHMARK(sp);
perl_call_pv("VIM::perldo", G_SCALAR | G_EVAL);
#ifdef AVOID_PL_ERRGV
str = SvPV(perl_get_sv("@", GV_ADD), length);
#else
str = SvPV(GvSV(PL_errgv), length);
#endif
if (length)
break;
SPAGAIN;

View File

@@ -7995,6 +7995,7 @@ nv_g_cmd(cap)
cap->arg = TRUE;
nv_visual(cap);
break;
#endif /* FEAT_VISUAL */
/* "gn", "gN" visually select next/previous search match
* "gn" selects next match
@@ -8006,9 +8007,7 @@ nv_g_cmd(cap)
if (!current_search(cap->count1, cap->nchar == 'n'))
#endif
beep_flush();
break;
#endif /* FEAT_VISUAL */
/*
* "gj" and "gk" two new funny movement keys -- up and down

View File

@@ -3319,6 +3319,8 @@ mch_system_classic(char *cmd, int options)
{
TranslateMessage(&msg);
pDispatchMessage(&msg);
delay = 1;
continue;
}
if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT)
break;

View File

@@ -3397,151 +3397,6 @@ current_word(oap, count, include, bigword)
return OK;
}
#if defined(FEAT_VISUAL) || defined(PROTO)
/*
* Find next search match under cursor, cursor at end.
* Used while an operator is pending, and in Visual mode.
* TODO: redo only works when used in operator pending mode
*/
int
current_search(count, forward)
long count;
int forward; /* move forward or backwards */
{
pos_T start_pos; /* position before the pattern */
pos_T orig_pos; /* position of the cursor at beginning */
pos_T pos; /* position after the pattern */
int i;
int dir;
int result; /* result of various function calls */
char_u old_p_ws = p_ws;
int visual_active = FALSE;
int flags = 0;
pos_T save_VIsual;
/* wrapping should not occur */
p_ws = FALSE;
/* Correct cursor when 'selection' is exclusive */
if (VIsual_active && *p_sel == 'e' && lt(VIsual, curwin->w_cursor))
dec_cursor();
if (VIsual_active)
{
orig_pos = curwin->w_cursor;
save_VIsual = VIsual;
visual_active = TRUE;
/* just started visual selection, only one character */
if (equalpos(VIsual, curwin->w_cursor))
visual_active = FALSE;
pos = curwin->w_cursor;
start_pos = VIsual;
/* make sure, searching further will extend the match */
if (VIsual_active)
{
if (forward)
incl(&pos);
else
decl(&pos);
}
}
else
orig_pos = pos = start_pos = curwin->w_cursor;
/*
* The trick is to first search backwards and then search forward again,
* so that a match at the current cursor position will be correctly
* captured.
*/
for (i = 0; i < 2; i++)
{
if (i && count == 1)
flags = SEARCH_START;
if (forward)
dir = i;
else
dir = !i;
result = searchit(curwin, curbuf, &pos, (dir ? FORWARD : BACKWARD),
spats[last_idx].pat, (long) (i ? count : 1),
SEARCH_KEEP | flags | (dir ? 0 : SEARCH_END),
RE_SEARCH, 0, NULL);
/* First search may fail, but then start searching from the
* beginning of the file (cursor might be on the search match)
* except when Visual mode is active, so that extending the visual
* selection works. */
if (!result && i) /* not found, abort */
{
curwin->w_cursor = orig_pos;
if (VIsual_active)
VIsual = save_VIsual;
p_ws = old_p_ws;
return FAIL;
}
else if (!i && !result && !visual_active)
{
if (forward) /* try again from start of buffer */
{
clearpos(&pos);
}
else /* try again from end of buffer */
{
/* searching backwards, so set pos to last line and col */
pos.lnum = curwin->w_buffer->b_ml.ml_line_count;
pos.col = STRLEN(ml_get(curwin->w_buffer->b_ml.ml_line_count));
}
}
}
start_pos = pos;
flags = (forward ? SEARCH_END : 0);
/* move to match */
result = searchit(curwin, curbuf, &pos, (forward ? FORWARD : BACKWARD),
spats[last_idx].pat, 0L, flags | SEARCH_KEEP, RE_SEARCH, 0, NULL);
if (!VIsual_active)
VIsual = start_pos;
p_ws = old_p_ws;
curwin->w_cursor = pos;
VIsual_active = TRUE;
VIsual_mode = 'v';
if (VIsual_active)
{
redraw_curbuf_later(INVERTED); /* update the inversion */
if (*p_sel == 'e' && ltoreq(VIsual, curwin->w_cursor))
inc_cursor();
}
#ifdef FEAT_FOLDING
if (fdo_flags & FDO_SEARCH && KeyTyped)
foldOpenCursor();
#endif
may_start_select('c');
#ifdef FEAT_MOUSE
setmouse();
#endif
#ifdef FEAT_CLIPBOARD
/* Make sure the clipboard gets updated. Needed because start and
* end are still the same, and the selection needs to be owned */
clip_star.vmode = NUL;
#endif
redraw_curbuf_later(INVERTED);
showmode();
return OK;
}
#endif /* FEAT_VISUAL */
/*
* Find sentence(s) under the cursor, cursor at end.
* When Visual active, extend it by one or more sentences.
@@ -4670,6 +4525,152 @@ current_quote(oap, count, include, quotechar)
#endif /* FEAT_TEXTOBJ */
#if defined(FEAT_VISUAL) || defined(PROTO)
/*
* Find next search match under cursor, cursor at end.
* Used while an operator is pending, and in Visual mode.
* TODO: redo only works when used in operator pending mode
*/
int
current_search(count, forward)
long count;
int forward; /* move forward or backwards */
{
pos_T start_pos; /* position before the pattern */
pos_T orig_pos; /* position of the cursor at beginning */
pos_T pos; /* position after the pattern */
int i;
int dir;
int result; /* result of various function calls */
char_u old_p_ws = p_ws;
int visual_active = FALSE;
int flags = 0;
pos_T save_VIsual;
/* wrapping should not occur */
p_ws = FALSE;
/* Correct cursor when 'selection' is exclusive */
if (VIsual_active && *p_sel == 'e' && lt(VIsual, curwin->w_cursor))
dec_cursor();
if (VIsual_active)
{
orig_pos = curwin->w_cursor;
save_VIsual = VIsual;
visual_active = TRUE;
/* just started visual selection, only one character */
if (equalpos(VIsual, curwin->w_cursor))
visual_active = FALSE;
pos = curwin->w_cursor;
start_pos = VIsual;
/* make sure, searching further will extend the match */
if (VIsual_active)
{
if (forward)
incl(&pos);
else
decl(&pos);
}
}
else
orig_pos = pos = start_pos = curwin->w_cursor;
/*
* The trick is to first search backwards and then search forward again,
* so that a match at the current cursor position will be correctly
* captured.
*/
for (i = 0; i < 2; i++)
{
if (i && count == 1)
flags = SEARCH_START;
if (forward)
dir = i;
else
dir = !i;
result = searchit(curwin, curbuf, &pos, (dir ? FORWARD : BACKWARD),
spats[last_idx].pat, (long) (i ? count : 1),
SEARCH_KEEP | flags | (dir ? 0 : SEARCH_END),
RE_SEARCH, 0, NULL);
/* First search may fail, but then start searching from the
* beginning of the file (cursor might be on the search match)
* except when Visual mode is active, so that extending the visual
* selection works. */
if (!result && i) /* not found, abort */
{
curwin->w_cursor = orig_pos;
if (VIsual_active)
VIsual = save_VIsual;
p_ws = old_p_ws;
return FAIL;
}
else if (!i && !result && !visual_active)
{
if (forward) /* try again from start of buffer */
{
clearpos(&pos);
}
else /* try again from end of buffer */
{
/* searching backwards, so set pos to last line and col */
pos.lnum = curwin->w_buffer->b_ml.ml_line_count;
pos.col = (colnr_T)STRLEN(
ml_get(curwin->w_buffer->b_ml.ml_line_count));
}
}
}
start_pos = pos;
flags = (forward ? SEARCH_END : 0);
/* move to match */
result = searchit(curwin, curbuf, &pos, (forward ? FORWARD : BACKWARD),
spats[last_idx].pat, 0L, flags | SEARCH_KEEP, RE_SEARCH, 0, NULL);
if (!VIsual_active)
VIsual = start_pos;
p_ws = old_p_ws;
curwin->w_cursor = pos;
VIsual_active = TRUE;
VIsual_mode = 'v';
if (VIsual_active)
{
redraw_curbuf_later(INVERTED); /* update the inversion */
if (*p_sel == 'e' && ltoreq(VIsual, curwin->w_cursor))
inc_cursor();
}
#ifdef FEAT_FOLDING
if (fdo_flags & FDO_SEARCH && KeyTyped)
foldOpenCursor();
#endif
may_start_select('c');
#ifdef FEAT_MOUSE
setmouse();
#endif
#ifdef FEAT_CLIPBOARD
/* Make sure the clipboard gets updated. Needed because start and
* end are still the same, and the selection needs to be owned */
clip_star.vmode = NUL;
#endif
redraw_curbuf_later(INVERTED);
showmode();
return OK;
}
#endif /* FEAT_VISUAL */
#if defined(FEAT_LISP) || defined(FEAT_CINDENT) || defined(FEAT_TEXTOBJ) \
|| defined(PROTO)
/*

View File

@@ -714,6 +714,20 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
623,
/**/
622,
/**/
621,
/**/
620,
/**/
619,
/**/
618,
/**/
617,
/**/
616,
/**/