Compare commits

...

8 Commits

Author SHA1 Message Date
Bram Moolenaar
7baa45dbbf updated for version 7.1-080 2007-08-18 15:00:42 +00:00
Bram Moolenaar
deefb63bfb updated for version 7.1-079 2007-08-15 18:41:34 +00:00
Bram Moolenaar
70c2a63474 updated for version 7.1-078 2007-08-15 18:08:50 +00:00
Bram Moolenaar
349955a205 updated for version 7.1-077 2007-08-14 21:07:36 +00:00
Bram Moolenaar
b0db569905 updated for version 7.1-076 2007-08-14 20:54:49 +00:00
Bram Moolenaar
3185918f8c updated for version 7.1-075 2007-08-14 20:41:13 +00:00
Bram Moolenaar
92c5aba92a updated for version 7.1-074 2007-08-14 20:29:31 +00:00
Bram Moolenaar
4d64b7891b updated for version 7.1-073 2007-08-14 20:16:42 +00:00
11 changed files with 79 additions and 33 deletions

View File

@@ -69,14 +69,14 @@ getGvimName(char *name, int runtime)
// Registry didn't work, use the search path.
if (name[0] == 0)
strcpy(name, searchpath("gvim.exe"));
strcpy(name, searchpath((char *)"gvim.exe"));
if (!runtime)
{
// Only when looking for the executable, not the runtime dir, we can
// search for the batch file or a name without a path.
if (name[0] == 0)
strcpy(name, searchpath("gvim.bat"));
strcpy(name, searchpath((char *)"gvim.bat"));
if (name[0] == 0)
strcpy(name, "gvim"); // finds gvim.bat or gvim.exe
@@ -152,9 +152,9 @@ dyn_libintl_init(char *dir)
FARPROC *ptr;
} libintl_entry[] =
{
{"gettext", (FARPROC*)&dyn_libintl_gettext},
{"textdomain", (FARPROC*)&dyn_libintl_textdomain},
{"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain},
{(char *)"gettext", (FARPROC*)&dyn_libintl_gettext},
{(char *)"textdomain", (FARPROC*)&dyn_libintl_textdomain},
{(char *)"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain},
{NULL, NULL}
};
@@ -835,7 +835,7 @@ searchpath(char *name)
(LPTSTR)location) > (HINSTANCE)32)
return location;
}
return "";
return (char *)"";
}
# endif
#endif

View File

@@ -207,7 +207,10 @@ buf_init_chartab(buf, global)
}
while (c <= c2)
{
if (!do_isalpha || isalpha(c)
/* Use the MB_ functions here, because isalpha() doesn't
* work properly when 'encoding' is "latin1" and the locale is
* "C". */
if (!do_isalpha || MB_ISLOWER(c) || MB_ISUPPER(c)
#ifdef FEAT_FKMAP
|| (p_altkeymap && (F_isalpha(c) || F_isdigit(c)))
#endif

View File

@@ -6802,7 +6802,7 @@ failret:
* "numbuf" is used for a number.
* Does not put quotes around strings, as ":echo" displays values.
* When "copyID" is not NULL replace recursive lists and dicts with "...".
* May return NULL;
* May return NULL.
*/
static char_u *
echo_string(tv, tofree, numbuf, copyID)
@@ -6887,7 +6887,7 @@ echo_string(tv, tofree, numbuf, copyID)
* If the memory is allocated "tofree" is set to it, otherwise NULL.
* "numbuf" is used for a number.
* Puts quotes around strings, so that they can be parsed back by eval().
* May return NULL;
* May return NULL.
*/
static char_u *
tv2string(tv, tofree, numbuf, copyID)
@@ -14974,6 +14974,10 @@ item_compare(s1, s2)
p1 = tv2string(&(*(listitem_T **)s1)->li_tv, &tofree1, numbuf1, 0);
p2 = tv2string(&(*(listitem_T **)s2)->li_tv, &tofree2, numbuf2, 0);
if (p1 == NULL)
p1 = (char_u *)"";
if (p2 == NULL)
p2 = (char_u *)"";
if (item_compare_ic)
res = STRICMP(p1, p2);
else
@@ -15463,7 +15467,8 @@ f_string(argvars, rettv)
rettv->v_type = VAR_STRING;
rettv->vval.v_string = tv2string(&argvars[0], &tofree, numbuf, 0);
if (tofree == NULL)
/* Make a copy if we have a value but it's not in allocate memory. */
if (rettv->vval.v_string != NULL && tofree == NULL)
rettv->vval.v_string = vim_strsave(rettv->vval.v_string);
}
@@ -18017,7 +18022,9 @@ list_one_var_a(prefix, name, type, string)
int type;
char_u *string;
{
msg_attr(prefix, 0); /* don't use msg(), it overwrites "v:statusmsg" */
/* don't use msg() or msg_attr() to avoid overwriting "v:statusmsg" */
msg_start();
msg_puts(prefix);
if (name != NULL) /* "a:" vars don't have a name stored */
msg_puts(name);
msg_putchar(' ');
@@ -20167,6 +20174,7 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict)
char_u buf[MSG_BUF_LEN];
char_u numbuf2[NUMBUFLEN];
char_u *tofree;
char_u *s;
msg_puts((char_u *)"(");
for (i = 0; i < argcount; ++i)
@@ -20177,10 +20185,13 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict)
msg_outnum((long)argvars[i].vval.v_number);
else
{
trunc_string(tv2string(&argvars[i], &tofree,
numbuf2, 0), buf, MSG_BUF_CLEN);
msg_puts(buf);
vim_free(tofree);
s = tv2string(&argvars[i], &tofree, numbuf2, 0);
if (s != NULL)
{
trunc_string(s, buf, MSG_BUF_CLEN);
msg_puts(buf);
vim_free(tofree);
}
}
}
msg_puts((char_u *)")");
@@ -20258,14 +20269,18 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict)
char_u buf[MSG_BUF_LEN];
char_u numbuf2[NUMBUFLEN];
char_u *tofree;
char_u *s;
/* The value may be very long. Skip the middle part, so that we
* have some idea how it starts and ends. smsg() would always
* truncate it at the end. */
trunc_string(tv2string(fc.rettv, &tofree, numbuf2, 0),
buf, MSG_BUF_CLEN);
smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
vim_free(tofree);
s = tv2string(fc.rettv, &tofree, numbuf2, 0);
if (s != NULL)
{
trunc_string(s, buf, MSG_BUF_CLEN);
smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
vim_free(tofree);
}
}
msg_puts((char_u *)"\n"); /* don't overwrite this either */

View File

@@ -4493,7 +4493,8 @@ separate_nextcmd(eap)
if (eap->argt & (USECTRLV | XFILE))
++p; /* skip CTRL-V and next char */
else
STRCPY(p, p + 1); /* remove CTRL-V and skip next char */
/* remove CTRL-V and skip next char */
mch_memmove(p, p + 1, STRLEN(p));
if (*p == NUL) /* stop at NUL after CTRL-V */
break;
}

View File

@@ -5117,7 +5117,7 @@ gui_handle_drop(x, y, modifiers, fnames, count)
p = vim_strsave_escaped(fnames[i], (char_u *)"\\ \t\"|");
# endif
if (p != NULL)
add_to_input_buf(p, (int)STRLEN(p));
add_to_input_buf_csi(p, (int)STRLEN(p));
vim_free(p);
vim_free(fnames[i]);
}

View File

@@ -54,10 +54,12 @@
/*
* toupper() and tolower() that use the current locale.
* On some systems toupper()/tolower() only work on lower/uppercase characters
* On some systems toupper()/tolower() only work on lower/uppercase
* characters, first use islower() or isupper() then.
* Careful: Only call TOUPPER_LOC() and TOLOWER_LOC() with a character in the
* range 0 - 255. toupper()/tolower() on some systems can't handle others.
* Note: for UTF-8 use utf_toupper() and utf_tolower().
* Note: It is often better to use MB_TOLOWER() and MB_TOUPPER(), because many
* toupper() and tolower() implementations only work for ASCII.
*/
#ifdef MSWIN
# define TOUPPER_LOC(c) toupper_tab[(c) & 255]

View File

@@ -104,7 +104,7 @@ set_indent(size, flags)
int ind_done = 0; /* measured in spaces */
int tab_pad;
int retval = FALSE;
int orig_char_len = 0; /* number of initial whitespace chars when
int orig_char_len = -1; /* number of initial whitespace chars when
'et' and 'pi' are both set */
/*
@@ -159,7 +159,7 @@ set_indent(size, flags)
/* Fill to next tabstop with a tab, if possible */
tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts);
if (todo >= tab_pad && orig_char_len == 0)
if (todo >= tab_pad && orig_char_len == -1)
{
doit = TRUE;
todo -= tab_pad;
@@ -206,11 +206,15 @@ set_indent(size, flags)
/* If 'preserveindent' and 'expandtab' are both set keep the original
* characters and allocate accordingly. We will fill the rest with spaces
* after the if (!curbuf->b_p_et) below. */
if (orig_char_len != 0)
if (orig_char_len != -1)
{
newline = alloc(orig_char_len + size - ind_done + line_len);
if (newline == NULL)
return FALSE;
todo = size - ind_done;
ind_len = orig_char_len + todo; /* Set total length of indent in
* characters, which may have been
* undercounted until now */
p = oldline;
s = newline;
while (orig_char_len > 0)
@@ -222,9 +226,6 @@ set_indent(size, flags)
* than old) */
while (vim_iswhite(*p))
(void)*p++;
todo = size - ind_done;
ind_len += todo; /* Set total length of indent in characters,
* which may have been undercounted until now */
}
else

View File

@@ -3760,7 +3760,8 @@ add_to_showcmd(c)
extra_len = (int)STRLEN(p);
overflow = old_len + extra_len - SHOWCMD_COLS;
if (overflow > 0)
STRCPY(showcmd_buf, showcmd_buf + overflow);
mch_memmove(showcmd_buf, showcmd_buf + overflow,
old_len - overflow + 1);
STRCAT(showcmd_buf, p);
if (char_avail())

View File

@@ -1727,6 +1727,13 @@ get_syntax_attr(col, can_spell)
{
int attr = 0;
if (can_spell != NULL)
/* Default: Only do spelling when there is no @Spell cluster or when
* ":syn spell toplevel" was used. */
*can_spell = syn_buf->b_syn_spell == SYNSPL_DEFAULT
? (syn_buf->b_spell_cluster_id == 0)
: (syn_buf->b_syn_spell == SYNSPL_TOP);
/* check for out of memory situation */
if (syn_buf->b_sst_array == NULL)
return 0;

View File

@@ -1603,8 +1603,6 @@ set_input_buf(p)
#if defined(FEAT_GUI) || defined(FEAT_MOUSE_GPM) \
|| defined(FEAT_XCLIPBOARD) || defined(VMS) \
|| defined(FEAT_SNIFF) || defined(FEAT_CLIENTSERVER) \
|| (defined(FEAT_GUI) && (!defined(USE_ON_FLY_SCROLL) \
|| defined(FEAT_MENU))) \
|| defined(PROTO)
/*
* Add the given bytes to the input buffer
@@ -1630,7 +1628,9 @@ add_to_input_buf(s, len)
}
#endif
#if (defined(FEAT_XIM) && defined(FEAT_GUI_GTK)) \
#if ((defined(FEAT_XIM) || defined(FEAT_DND)) && defined(FEAT_GUI_GTK)) \
|| defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_MAC) \
|| (defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)) \
|| (defined(FEAT_GUI) && (!defined(USE_ON_FLY_SCROLL) \
|| defined(FEAT_MENU))) \

View File

@@ -666,6 +666,22 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
80,
/**/
79,
/**/
78,
/**/
77,
/**/
76,
/**/
75,
/**/
74,
/**/
73,
/**/
72,
/**/