Compare commits

...

3 Commits

Author SHA1 Message Date
Bram Moolenaar
c395a3aac2 updated for version 7.3.040
Problem:    Comparing strings while ignoring case goes beyond end of the
            string when there are illegal bytes. (Dominique Pelle)
Solution:   Explicitly check for illegal bytes.
2010-10-27 13:37:44 +02:00
Bram Moolenaar
fc3c83e47e updated for version 7.3.039
Problem:    Crash when using skk.vim plugin.
Solution:   Get length of expression evaluation result only after checking for
            NULL.  (Noriaki Yagi, Dominique Pelle)
2010-10-27 12:58:23 +02:00
Bram Moolenaar
264e9fd61b updated for version 7.3.038
Problem:    v:windowid isn't set on MS-Windows.
Solution:   Set it to the window handle. (Chris Sutcliffe)
2010-10-27 12:33:17 +02:00
5 changed files with 36 additions and 15 deletions

View File

@@ -1660,7 +1660,11 @@ v:warningmsg Last given warning message. It's allowed to set this variable.
*v:windowid* *windowid-variable*
v:windowid When any X11 based GUI is running or when running in a
terminal and Vim connects to the X server (|-X|) this will be
set to the window ID. Otherwise the value is zero.
set to the window ID.
When an MS-Windows GUI is running this will be set to the
window handle.
Otherwise the value is zero.
Note: for windows inside Vim use |winnr()|.
==============================================================================
4. Builtin Functions *functions*

View File

@@ -688,24 +688,27 @@ getcmdline(firstc, count, indent)
p = get_expr_line();
--textlock;
restore_cmdline(&save_ccline);
len = (int)STRLEN(p);
if (p != NULL && realloc_cmdbuff(len + 1) == OK)
if (p != NULL)
{
ccline.cmdlen = len;
STRCPY(ccline.cmdbuff, p);
vim_free(p);
len = (int)STRLEN(p);
if (realloc_cmdbuff(len + 1) == OK)
{
ccline.cmdlen = len;
STRCPY(ccline.cmdbuff, p);
vim_free(p);
/* Restore the cursor or use the position set with
* set_cmdline_pos(). */
if (new_cmdpos > ccline.cmdlen)
ccline.cmdpos = ccline.cmdlen;
else
ccline.cmdpos = new_cmdpos;
/* Restore the cursor or use the position set with
* set_cmdline_pos(). */
if (new_cmdpos > ccline.cmdlen)
ccline.cmdpos = ccline.cmdlen;
else
ccline.cmdpos = new_cmdpos;
KeyTyped = FALSE; /* Don't do p_wc completion. */
redrawcmd();
goto cmdline_changed;
KeyTyped = FALSE; /* Don't do p_wc completion. */
redrawcmd();
goto cmdline_changed;
}
}
}
beep_flush();

View File

@@ -1573,6 +1573,11 @@ gui_mch_init(void)
# endif
#endif
#ifdef FEAT_EVAL
/* set the v:windowid variable */
set_vim_var_nr(VV_WINDOWID, (long)s_hwnd);
#endif
theend:
/* Display any pending error messages */
display_errors();

View File

@@ -3124,6 +3124,9 @@ mb_strnicmp(s1, s2, nn)
/* If one of the two characters is incomplete return -1. */
if (incomplete || i + utf_byte2len(s2[i]) > n)
return -1;
/* Don't case-fold illegal bytes or truncated characters. */
if (utf_ptr2len(s1 + i) < l || utf_ptr2len(s2 + i) < l)
return -1;
cdiff = utf_fold(utf_ptr2char(s1 + i))
- utf_fold(utf_ptr2char(s2 + i));
if (cdiff != 0)

View File

@@ -714,6 +714,12 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
40,
/**/
39,
/**/
38,
/**/
37,
/**/