Compare commits

...

10 Commits

Author SHA1 Message Date
Bram Moolenaar
4e2a59505e updated for version 7.2-102 2009-02-05 19:48:25 +00:00
Bram Moolenaar
13658318b9 updated for version 7.2-101 2009-02-04 17:35:52 +00:00
Bram Moolenaar
73881403a2 updated for version 7.2-100 2009-02-04 16:50:47 +00:00
Bram Moolenaar
faff14ae03 updated for version 7.2-099 2009-02-04 16:29:07 +00:00
Bram Moolenaar
b67cc16e02 updated for version 7.2-098 2009-02-04 15:27:06 +00:00
Bram Moolenaar
0725608d1a updated for version 7.2-097 2009-02-04 13:19:42 +00:00
Bram Moolenaar
65b9a6ad59 updated for version 7.2-096 2009-02-04 12:14:51 +00:00
Bram Moolenaar
57fb0da2f9 updated for version 7.2-095 2009-02-04 10:46:25 +00:00
Bram Moolenaar
5b3e460036 updated for version 7.2-094 2009-02-04 10:20:58 +00:00
Bram Moolenaar
3ca9a8a00d updated for version 7.2-093 2009-01-28 20:23:17 +00:00
11 changed files with 199 additions and 31 deletions

View File

@@ -354,6 +354,9 @@ MSVCVER = 9.0
!if "$(_NMAKE_VER)" == "9.00.21022.08"
MSVCVER = 9.0
!endif
!if "$(_NMAKE_VER)" == "9.00.30729.01"
MSVCVER = 9.0
!endif
!endif
# Abort bulding VIM if version of VC is unrecognised.

View File

@@ -1958,6 +1958,7 @@ backspace_until_column(col)
* Only matters when there are composing characters.
* Return TRUE when something was deleted.
*/
/*ARGSUSED*/
static int
del_char_after_col(limit_col)
int limit_col;
@@ -1971,7 +1972,7 @@ del_char_after_col(limit_col)
* skip forward again when going too far back because of a
* composing character. */
mb_adjust_cursor();
while (curwin->w_cursor.col < limit_col)
while (curwin->w_cursor.col < (colnr_T)limit_col)
{
int l = utf_ptr2len(ml_get_cursor());
@@ -4240,7 +4241,7 @@ ins_compl_get_exp(ini)
}
/* check if compl_curr_match has changed, (e.g. other type of
* expansion added somenthing) */
* expansion added something) */
if (type != 0 && compl_curr_match != old_match)
found_new_match = OK;
@@ -4741,7 +4742,7 @@ ins_complete(c)
}
compl_length = curwin->w_cursor.col - (int)compl_col;
/* IObuff is used to add a "word from the next line" would we
* have enough space? just being paranoic */
* have enough space? just being paranoid */
#define MIN_SPACE 75
if (compl_length > (IOSIZE - MIN_SPACE))
{
@@ -8206,7 +8207,7 @@ ins_ctrl_o()
/*
* If the cursor is on an indent, ^T/^D insert/delete one
* shiftwidth. Otherwise ^T/^D behave like a "<<" or ">>".
* Always round the indent to 'shiftwith', this is compatible
* Always round the indent to 'shiftwidth', this is compatible
* with vi. But vi only supports ^T and ^D after an
* autoindent, we support it everywhere.
*/

View File

@@ -3928,7 +3928,7 @@ eval0(arg, rettv, nextcmd, evaluate)
/*
* Handle top level expression:
* expr1 ? expr0 : expr0
* expr2 ? expr1 : expr1
*
* "arg" must point to the first non-white of the expression.
* "arg" is advanced to the next non-white after the recognized expression.
@@ -19912,7 +19912,7 @@ ex_function(eap)
: eval_isnamec(arg[j])))
++j;
if (arg[j] != NUL)
emsg_funcname(e_invarg2, arg);
emsg_funcname((char *)e_invarg2, arg);
}
}

View File

@@ -2417,8 +2417,8 @@ print_line(lnum, use_number, list)
cursor_on(); /* msg_start() switches it off */
out_flush();
silent_mode = save_silent;
info_message = FALSE;
}
info_message = FALSE;
}
/*

View File

@@ -2842,6 +2842,7 @@ do_source(fname, check_other, is_vimrc)
linenr_T save_sourcing_lnum;
char_u *p;
char_u *fname_exp;
char_u *firstline = NULL;
int retval = FAIL;
#ifdef FEAT_EVAL
scid_T save_current_SID;
@@ -2992,23 +2993,6 @@ do_source(fname, check_other, is_vimrc)
cookie.level = ex_nesting_level;
#endif
#ifdef FEAT_MBYTE
cookie.conv.vc_type = CONV_NONE; /* no conversion */
/* Try reading the first few bytes to check for a UTF-8 BOM. */
{
char_u buf[3];
if (fread((char *)buf, sizeof(char_u), (size_t)3, cookie.fp)
== (size_t)3
&& buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf)
/* Found BOM, setup conversion and skip over it. */
convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc);
else
/* No BOM found, rewind. */
fseek(cookie.fp, 0L, SEEK_SET);
}
#endif
/*
* Keep the sourcing name/lnum, for recursive calls.
@@ -3018,6 +3002,27 @@ do_source(fname, check_other, is_vimrc)
save_sourcing_lnum = sourcing_lnum;
sourcing_lnum = 0;
#ifdef FEAT_MBYTE
cookie.conv.vc_type = CONV_NONE; /* no conversion */
/* Read the first line so we can check for a UTF-8 BOM. */
firstline = getsourceline(0, (void *)&cookie, 0);
if (firstline != NULL && STRLEN(firstline) >= 3 && firstline[0] == 0xef
&& firstline[1] == 0xbb && firstline[2] == 0xbf)
{
/* Found BOM; setup conversion, skip over BOM and recode the line. */
convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc);
p = string_convert(&cookie.conv, firstline + 3, NULL);
if (p == NULL)
p = vim_strsave(firstline + 3);
if (p != NULL)
{
vim_free(firstline);
firstline = p;
}
}
#endif
#ifdef STARTUPTIME
time_push(&tv_rel, &tv_start);
#endif
@@ -3111,9 +3116,8 @@ do_source(fname, check_other, is_vimrc)
/*
* Call do_cmdline, which will call getsourceline() to get the lines.
*/
do_cmdline(NULL, getsourceline, (void *)&cookie,
do_cmdline(firstline, getsourceline, (void *)&cookie,
DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_REPEAT);
retval = OK;
#ifdef FEAT_PROFILE
@@ -3171,6 +3175,7 @@ almosttheend:
#endif
fclose(cookie.fp);
vim_free(cookie.nextline);
vim_free(firstline);
#ifdef FEAT_MBYTE
convert_setup(&cookie.conv, NULL, NULL);
#endif

View File

@@ -1582,6 +1582,17 @@ gui_mch_init(void)
s_findrep_struct.lpstrReplaceWith[0] = NUL;
s_findrep_struct.wFindWhatLen = MSWIN_FR_BUFSIZE;
s_findrep_struct.wReplaceWithLen = MSWIN_FR_BUFSIZE;
# if defined(FEAT_MBYTE) && defined(WIN3264)
s_findrep_struct_w.lStructSize = sizeof(s_findrep_struct_w);
s_findrep_struct_w.lpstrFindWhat =
(LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
s_findrep_struct_w.lpstrFindWhat[0] = NUL;
s_findrep_struct_w.lpstrReplaceWith =
(LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR));
s_findrep_struct_w.lpstrReplaceWith[0] = NUL;
s_findrep_struct_w.wFindWhatLen = MSWIN_FR_BUFSIZE;
s_findrep_struct_w.wReplaceWithLen = MSWIN_FR_BUFSIZE;
# endif
#endif
theend:
@@ -2938,8 +2949,27 @@ dialog_callback(
/* If the edit box exists, copy the string. */
if (s_textfield != NULL)
GetDlgItemText(hwnd, DLG_NONBUTTON_CONTROL + 2,
{
# if defined(FEAT_MBYTE) && defined(WIN3264)
/* If the OS is Windows NT, and 'encoding' differs from active
* codepage: use wide function and convert text. */
if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT
&& enc_codepage >= 0 && (int)GetACP() != enc_codepage)
{
WCHAR *wp = (WCHAR *)alloc(IOSIZE * sizeof(WCHAR));
char_u *p;
GetDlgItemTextW(hwnd, DLG_NONBUTTON_CONTROL + 2, wp, IOSIZE);
p = utf16_to_enc(wp, NULL);
vim_strncpy(s_textfield, p, IOSIZE);
vim_free(p);
vim_free(wp);
}
else
# endif
GetDlgItemText(hwnd, DLG_NONBUTTON_CONTROL + 2,
s_textfield, IOSIZE);
}
/*
* Need to check for IDOK because if the user just hits Return to

View File

@@ -153,6 +153,9 @@ static int destroying = FALSE; /* call DestroyWindow() ourselves */
#ifdef MSWIN_FIND_REPLACE
static UINT s_findrep_msg = 0; /* set in gui_w[16/32].c */
static FINDREPLACE s_findrep_struct;
# if defined(FEAT_MBYTE) && defined(WIN3264)
static FINDREPLACEW s_findrep_struct_w;
# endif
static HWND s_findrep_hwnd = NULL;
static int s_findrep_is_find; /* TRUE for find dialog, FALSE
for find/replace dialog */
@@ -884,6 +887,45 @@ _OnMenu(
#endif
#ifdef MSWIN_FIND_REPLACE
# if defined(FEAT_MBYTE) && defined(WIN3264)
/*
* copy useful data from structure LPFINDREPLACE to structure LPFINDREPLACEW
*/
static void
findrep_atow(LPFINDREPLACEW lpfrw, LPFINDREPLACE lpfr)
{
WCHAR *wp;
lpfrw->hwndOwner = lpfr->hwndOwner;
lpfrw->Flags = lpfr->Flags;
wp = enc_to_utf16(lpfr->lpstrFindWhat, NULL);
wcsncpy(lpfrw->lpstrFindWhat, wp, lpfrw->wFindWhatLen - 1);
vim_free(wp);
/* the field "lpstrReplaceWith" doesn't need to be copied */
}
/*
* copy useful data from structure LPFINDREPLACEW to structure LPFINDREPLACE
*/
static void
findrep_wtoa(LPFINDREPLACE lpfr, LPFINDREPLACEW lpfrw)
{
char_u *p;
lpfr->Flags = lpfrw->Flags;
p = utf16_to_enc(lpfrw->lpstrFindWhat, NULL);
vim_strncpy(lpfr->lpstrFindWhat, p, lpfr->wFindWhatLen - 1);
vim_free(p);
p = utf16_to_enc(lpfrw->lpstrReplaceWith, NULL);
vim_strncpy(lpfr->lpstrReplaceWith, p, lpfr->wReplaceWithLen - 1);
vim_free(p);
}
# endif
/*
* Handle a Find/Replace window message.
*/
@@ -893,6 +935,16 @@ _OnFindRepl(void)
int flags = 0;
int down;
# if defined(FEAT_MBYTE) && defined(WIN3264)
/* If the OS is Windows NT, and 'encoding' differs from active codepage:
* convert text from wide string. */
if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT
&& enc_codepage >= 0 && (int)GetACP() != enc_codepage)
{
findrep_wtoa(&s_findrep_struct, &s_findrep_struct_w);
}
# endif
if (s_findrep_struct.Flags & FR_DIALOGTERM)
/* Give main window the focus back. */
(void)SetFocus(s_hwnd);
@@ -2562,7 +2614,19 @@ gui_mch_find_dialog(exarg_T *eap)
if (!IsWindow(s_findrep_hwnd))
{
initialise_findrep(eap->arg);
s_findrep_hwnd = FindText((LPFINDREPLACE) &s_findrep_struct);
# if defined(FEAT_MBYTE) && defined(WIN3264)
/* If the OS is Windows NT, and 'encoding' differs from active
* codepage: convert text and use wide function. */
if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT
&& enc_codepage >= 0 && (int)GetACP() != enc_codepage)
{
findrep_atow(&s_findrep_struct_w, &s_findrep_struct);
s_findrep_hwnd = FindTextW(
(LPFINDREPLACEW) &s_findrep_struct_w);
}
else
# endif
s_findrep_hwnd = FindText((LPFINDREPLACE) &s_findrep_struct);
}
set_window_title(s_findrep_hwnd,
@@ -2587,7 +2651,18 @@ gui_mch_replace_dialog(exarg_T *eap)
if (!IsWindow(s_findrep_hwnd))
{
initialise_findrep(eap->arg);
s_findrep_hwnd = ReplaceText((LPFINDREPLACE) &s_findrep_struct);
# if defined(FEAT_MBYTE) && defined(WIN3264)
if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT
&& enc_codepage >= 0 && (int)GetACP() != enc_codepage)
{
findrep_atow(&s_findrep_struct_w, &s_findrep_struct);
s_findrep_hwnd = ReplaceTextW(
(LPFINDREPLACEW) &s_findrep_struct_w);
}
else
# endif
s_findrep_hwnd = ReplaceText(
(LPFINDREPLACE) &s_findrep_struct);
}
set_window_title(s_findrep_hwnd,

View File

@@ -6783,6 +6783,8 @@ nv_replace(cap)
/* Visual mode "r" */
if (VIsual_active)
{
if (got_int)
reset_VIsual();
nv_operator(cap);
return;
}
@@ -7839,7 +7841,7 @@ nv_g_cmd(cap)
else
i = curwin->w_leftcol;
/* Go to the middle of the screen line. When 'number' is on and lines
* are wrapping the middle can be more to the left.*/
* are wrapping the middle can be more to the left. */
if (cap->nchar == 'm')
i += (W_WIDTH(curwin) - curwin_col_off()
+ ((curwin->w_p_wrap && i > 0)

View File

@@ -5407,6 +5407,10 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
int did_chartab = FALSE;
char_u **gvarp;
long_u free_oldval = (options[opt_idx].flags & P_ALLOCED);
#ifdef FEAT_GUI
/* set when changing an option that only requires a redraw in the GUI */
int redraw_gui_only = FALSE;
#endif
/* Get the global option to compare with, otherwise we would have to check
* two values for all local options. */
@@ -6055,6 +6059,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
errmsg = (char_u *)N_("E596: Invalid font(s)");
}
}
redraw_gui_only = TRUE;
}
# ifdef FEAT_XFONTSET
else if (varp == &p_guifontset)
@@ -6063,6 +6068,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
errmsg = (char_u *)N_("E597: can't select fontset");
else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
errmsg = (char_u *)N_("E598: Invalid fontset");
redraw_gui_only = TRUE;
}
# endif
# ifdef FEAT_MBYTE
@@ -6072,6 +6078,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
errmsg = (char_u *)N_("E533: can't select wide font");
else if (gui_get_wide_font() == FAIL)
errmsg = (char_u *)N_("E534: Invalid wide font");
redraw_gui_only = TRUE;
}
# endif
#endif
@@ -6133,13 +6140,24 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
#ifdef FEAT_GUI
/* 'guioptions' */
else if (varp == &p_go)
{
gui_init_which_components(oldval);
redraw_gui_only = TRUE;
}
#endif
#if defined(FEAT_GUI_TABLINE)
/* 'guitablabel' */
else if (varp == &p_gtl)
{
redraw_tabline = TRUE;
redraw_gui_only = TRUE;
}
/* 'guitabtooltip' */
else if (varp == &p_gtt)
{
redraw_gui_only = TRUE;
}
#endif
#if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS))
@@ -6717,7 +6735,11 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE; /* in case 'showbreak' changed */
check_redraw(options[opt_idx].flags);
#ifdef FEAT_GUI
/* check redraw when it's not a GUI option or the GUI is active. */
if (!redraw_gui_only || gui.in_use)
#endif
check_redraw(options[opt_idx].flags);
return errmsg;
}

View File

@@ -3950,7 +3950,17 @@ mch_call_shell(cmd, options)
* children can be kill()ed. Don't do this when using pipes,
* because stdin is not a tty, we would lose /dev/tty. */
if (p_stmp)
{
(void)setsid();
# if defined(SIGHUP)
/* When doing "!xterm&" and 'shell' is bash: the shell
* will exit and send SIGHUP to all processes in its
* group, killing the just started process. Ignore SIGHUP
* to avoid that. (suggested by Simon Schubert)
*/
signal(SIGHUP, SIG_IGN);
# endif
}
# endif
# ifdef FEAT_GUI
if (pty_slave_fd >= 0)

View File

@@ -676,6 +676,26 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
102,
/**/
101,
/**/
100,
/**/
99,
/**/
98,
/**/
97,
/**/
96,
/**/
95,
/**/
94,
/**/
93,
/**/
92,
/**/