Compare commits

..

11 Commits

Author SHA1 Message Date
Bram Moolenaar
e685079848 updated for version 7.2.424
Problem:    ":colorscheme" without an argument doesn't do anything.
Solution:   Make it echo the current color scheme name.  (partly by Christian
            Brabandt)
2010-05-14 15:28:44 +02:00
Bram Moolenaar
9577c3e973 updated for version 7.2.423
Problem:    Crash when assigning s: to variable. (Yukihiro Nakadaira)
Solution:   Make ga_scripts contain pointer to scriptvar_T instead of
            scriptvar_T itself. (Dominique Pelle)
2010-05-14 12:16:25 +02:00
Bram Moolenaar
54ab0f1e54 updated for version 7.2.422
Problem:    May get E763 when using spell dictionaries.
Solution:   Avoid utf-8 case folded character to be truncated to 8 bits and
            differ from latin1. (Dominique Pelle)
2010-05-13 17:46:58 +02:00
Bram Moolenaar
38ab0e21b8 updated for version 7.2.421
Problem:    Folds are sometimes not updated properly and there is no way to
            force an update.
Solution:   Make "zx" and "zX" recompute folds (suggested by Christian
            Brabandt)
2010-05-13 17:35:59 +02:00
Bram Moolenaar
eb4883fabc updated for version 7.2.420
Problem:    ":argedit" does not accept "++enc=utf8" as documented. (Dominique
            Pelle)
Solution:   Add the ARGOPT flag to ":argedit".
2010-05-13 16:46:21 +02:00
Bram Moolenaar
103e6efc84 updated for version 7.2.419
Problem:    Memory leak in Motif when clicking on "Search Vim Help".
Solution:   Free string returned by XmTextGetString(). (Dominique Pelle)
2010-05-13 16:31:25 +02:00
Bram Moolenaar
ccbab93b42 updated for version 7.2.418
Problem:    Vim tries to set the background or foreground color in a terminal
            to -1.  (Graywh)  Happens with ":hi Normal ctermbg=NONE".
Solution:   When resetting the foreground or background color don't set the
            color, let the clear screen code do that.
2010-05-13 15:40:30 +02:00
Bram Moolenaar
ae61bcf0ab updated for version 7.2.417
Problem:    When 'shell' has an argument with a slash then 'shellpipe' is not
            set properly. (Britton Kerin)
Solution:   Assume there are no spaces in the path, arguments follow.
2010-05-13 13:12:06 +02:00
Bram Moolenaar
0387e653c8 updated for version 7.2.416
Problem:    Logtalk.dict is not installed.
Solution:   Add it to the install target. (Markus Heidelberg)
2010-05-07 16:54:37 +02:00
Bram Moolenaar
ad249fb74c updated for version 7.2.415
Problem:    Win32: Can't open a remote file when starting Vim.
Solution:   Don't invoke cygwin_conv_path() for URLs. (Tomoya Adachi)
2010-05-07 16:35:04 +02:00
Bram Moolenaar
ceb45be4d3 updated for version 7.2.414
Problem:    CTRK-K <space> <space> does not produce 0xa0 as expected. (Tony
            Mechelynck)
Solution:   Remove the Unicode range 0xe000 - 0xefff from digraphs, these are
            not valid characters.
2010-05-07 16:18:14 +02:00
12 changed files with 126 additions and 74 deletions

View File

@@ -30,7 +30,7 @@
# want to disable using X11 libraries. This speeds up starting Vim,
# but the window title will not be set and the X11 selection can not
# used.
# - Uncomment the line "CONF_OPT_XSMP = --without-xsmp" if you have the
# - Uncomment the line "CONF_OPT_XSMP = --disable-xsmp" if you have the
# X11 Session Management Protocol (XSMP) library (libSM) but do not
# want to use it.
# This can speedup Vim startup but Vim loses the ability to catch the
@@ -1882,7 +1882,7 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(DEST_RT) \
cd $(PLUGSOURCE); $(INSTALL_DATA) *.vim README.txt $(DEST_PLUG)
cd $(DEST_PLUG); chmod $(HELPMOD) *.vim README.txt
# install the ftplugin files
cd $(FTPLUGSOURCE); $(INSTALL_DATA) *.vim README.txt $(DEST_FTP)
cd $(FTPLUGSOURCE); $(INSTALL_DATA) *.vim README.txt logtalk.dict $(DEST_FTP)
cd $(DEST_FTP); chmod $(HELPMOD) *.vim README.txt
# install the compiler files
cd $(COMPSOURCE); $(INSTALL_DATA) *.vim README.txt $(DEST_COMP)

View File

@@ -1933,45 +1933,8 @@ static digr_T digraphdefault[] =
{'7', 'c', 0x3226},
{'8', 'c', 0x3227},
{'9', 'c', 0x3228},
{' ', ' ', 0xe000},
{'/', 'c', 0xe001},
{'U', 'A', 0xe002},
{'U', 'B', 0xe003},
{'"', '3', 0xe004},
{'"', '1', 0xe005},
{'"', '!', 0xe006},
{'"', '\'', 0xe007},
{'"', '>', 0xe008},
{'"', '?', 0xe009},
{'"', '-', 0xe00a},
{'"', '(', 0xe00b},
{'"', '.', 0xe00c},
{'"', ':', 0xe00d},
{'"', '0', 0xe00e},
{'"', '"', 0xe00f},
{'"', '<', 0xe010},
{'"', ',', 0xe011},
{'"', ';', 0xe012},
{'"', '_', 0xe013},
{'"', '=', 0xe014},
{'"', '/', 0xe015},
{'"', 'i', 0xe016},
{'"', 'd', 0xe017},
{'"', 'p', 0xe018},
{';', ';', 0xe019},
{',', ',', 0xe01a},
{'b', '3', 0xe01b},
{'C', 'i', 0xe01c},
{'f', '(', 0xe01d},
{'e', 'd', 0xe01e},
{'a', 'm', 0xe01f},
{'p', 'm', 0xe020},
{'F', 'l', 0xe023},
{'G', 'F', 0xe024},
{'>', 'V', 0xe025},
{'!', '*', 0xe026},
{'?', '*', 0xe027},
{'J', '<', 0xe028},
/* code points 0xe000 - 0xefff excluded, they have no assigned
* characters, only used in proposals. */
{'f', 'f', 0xfb00},
{'f', 'i', 0xfb01},
{'f', 'l', 0xfb02},

View File

@@ -145,9 +145,9 @@ typedef struct
dict_T sv_dict;
} scriptvar_T;
static garray_T ga_scripts = {0, 0, sizeof(scriptvar_T), 4, NULL};
#define SCRIPT_SV(id) (((scriptvar_T *)ga_scripts.ga_data)[(id) - 1])
#define SCRIPT_VARS(id) (SCRIPT_SV(id).sv_dict.dv_hashtab)
static garray_T ga_scripts = {0, 0, sizeof(scriptvar_T *), 4, NULL};
#define SCRIPT_SV(id) (((scriptvar_T **)ga_scripts.ga_data)[(id) - 1])
#define SCRIPT_VARS(id) (SCRIPT_SV(id)->sv_dict.dv_hashtab)
static int echo_attr = 0; /* attributes used for ":echo" */
@@ -866,10 +866,6 @@ eval_clear()
hash_init(&vimvarht); /* garbage_collect() will access it */
hash_clear(&compat_hashtab);
/* script-local variables */
for (i = 1; i <= ga_scripts.ga_len; ++i)
vars_clear(&SCRIPT_VARS(i));
ga_clear(&ga_scripts);
free_scriptnames();
/* global variables */
@@ -878,6 +874,14 @@ eval_clear()
/* autoloaded script names */
ga_clear_strings(&ga_loaded);
/* script-local variables */
for (i = 1; i <= ga_scripts.ga_len; ++i)
{
vars_clear(&SCRIPT_VARS(i));
vim_free(SCRIPT_SV(i));
}
ga_clear(&ga_scripts);
/* unreferenced lists and dicts */
(void)garbage_collect();
@@ -18803,7 +18807,7 @@ find_var_in_ht(ht, varname, writing)
/* Must be something like "s:", otherwise "ht" would be NULL. */
switch (varname[-2])
{
case 's': return &SCRIPT_SV(current_SID).sv_var;
case 's': return &SCRIPT_SV(current_SID)->sv_var;
case 'g': return &globvars_var;
case 'v': return &vimvars_var;
case 'b': return &curbuf->b_bufvar;
@@ -18928,13 +18932,14 @@ new_script_vars(id)
ht = &SCRIPT_VARS(i);
if (ht->ht_mask == HT_INIT_SIZE - 1)
ht->ht_array = ht->ht_smallarray;
sv = &SCRIPT_SV(i);
sv = SCRIPT_SV(i);
sv->sv_var.di_tv.vval.v_dict = &sv->sv_dict;
}
while (ga_scripts.ga_len < id)
{
sv = &SCRIPT_SV(ga_scripts.ga_len + 1);
sv = SCRIPT_SV(ga_scripts.ga_len + 1) =
(scriptvar_T *)alloc_clear(sizeof(scriptvar_T));
init_var_dict(&sv->sv_dict, &sv->sv_var);
++ga_scripts.ga_len;
}
@@ -21931,7 +21936,7 @@ write_viminfo_varlist(fp)
if (find_viminfo_parameter('!') == NULL)
return;
fprintf(fp, _("\n# global variables:\n"));
fputs(_("\n# global variables:\n"), fp);
todo = (int)globvarht.ht_used;
for (hi = globvarht.ht_array; todo > 0; ++hi)

View File

@@ -52,7 +52,7 @@
#define ARGOPT 0x40000L /* allow "++opt=val" argument */
#define SBOXOK 0x80000L /* allowed in the sandbox */
#define CMDWIN 0x100000L /* allowed in cmdline window */
#define MODIFY 0x200000L /* forbidden in non-'modifiable' buffer */
#define MODIFY 0x200000L /* forbidden in non-'modifiable' buffer */
#define EXFLAGS 0x400000L /* allow flags after count in argument */
#define FILES (XFILE | EXTRA) /* multiple extra files allowed */
#define WORD1 (EXTRA | NOSPC) /* one extra word allowed */
@@ -116,7 +116,7 @@ EX(CMD_argdelete, "argdelete", ex_argdelete,
EX(CMD_argdo, "argdo", ex_listdo,
BANG|NEEDARG|EXTRA|NOTRLCOM),
EX(CMD_argedit, "argedit", ex_argedit,
BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|TRLBAR),
BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_argglobal, "argglobal", ex_args,
BANG|FILES|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_arglocal, "arglocal", ex_args,
@@ -256,7 +256,7 @@ EX(CMD_copy, "copy", ex_copymove,
EX(CMD_colder, "colder", qf_age,
RANGE|NOTADR|COUNT|TRLBAR),
EX(CMD_colorscheme, "colorscheme", ex_colorscheme,
NEEDARG|WORD1|TRLBAR|CMDWIN),
WORD1|TRLBAR|CMDWIN),
EX(CMD_command, "command", ex_command,
EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_comclear, "comclear", ex_comclear,

View File

@@ -6226,7 +6226,31 @@ parse_compl_arg(value, vallen, complp, argt, compl_arg)
ex_colorscheme(eap)
exarg_T *eap;
{
if (load_colors(eap->arg) == FAIL)
if (*eap->arg == NUL)
{
#ifdef FEAT_EVAL
char_u *expr = vim_strsave((char_u *)"g:colors_name");
char_u *p = NULL;
if (expr != NULL)
{
++emsg_off;
p = eval_to_string(expr, NULL, FALSE);
--emsg_off;
vim_free(expr);
}
if (p != NULL)
{
MSG(p);
vim_free(p);
}
else
MSG("default");
#else
MSG(_("unknown"));
#endif
}
else if (load_colors(eap->arg) == FAIL)
EMSG2(_("E185: Cannot find color scheme %s"), eap->arg);
}

View File

@@ -2917,6 +2917,7 @@ gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
*textfield = NUL;
else
vim_strncpy(textfield, p, IOSIZE - 1);
XtFree((char *)p);
}
suppress_dialog_mnemonics(dialogform);

View File

@@ -1477,7 +1477,7 @@ parse_command_name(parmp)
++initstr;
}
/* Avoid using evim mode for "editor". */
/* Use evim mode for "evim" and "egvim", not for "editor". */
if (TOLOWER_ASC(initstr[0]) == 'e'
&& (TOLOWER_ASC(initstr[1]) == 'v'
|| TOLOWER_ASC(initstr[1]) == 'g'))
@@ -2262,7 +2262,7 @@ scripterror:
* Look for evidence of non-Cygwin paths before we bother.
* This is only for when using the Unix files.
*/
if (strpbrk(p, "\\:") != NULL)
if (strpbrk(p, "\\:") != NULL && !path_with_url(p))
{
char posix_path[PATH_MAX];

View File

@@ -4936,13 +4936,15 @@ dozet:
/* "zx": re-apply 'foldlevel' and open folds at the cursor */
case 'x': curwin->w_p_fen = TRUE;
newFoldLevel(); /* update right now */
curwin->w_foldinvalid = TRUE; /* recompute folds */
newFoldLevel(); /* update right now */
foldOpenCursor();
break;
/* "zX": undo manual opens/closes, re-apply 'foldlevel' */
case 'X': curwin->w_p_fen = TRUE;
old_fdl = -1; /* force an update */
curwin->w_foldinvalid = TRUE; /* recompute folds */
old_fdl = -1; /* force an update */
break;
/* "zm": fold more */

View File

@@ -3696,9 +3696,32 @@ set_init_3()
* Isolate the name of the shell:
* - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f".
* - Remove any argument. E.g., "csh -f" -> "csh".
* But don't allow a space in the path, so that this works:
* "/usr/bin/csh --rcfile ~/.cshrc"
* But don't do that for Windows, it's common to have a space in the path.
*/
#ifdef WIN3264
p = gettail(p_sh);
p = vim_strnsave(p, (int)(skiptowhite(p) - p));
#else
p = skiptowhite(p_sh);
if (*p == NUL)
{
/* No white space, use the tail. */
p = vim_strsave(gettail(p_sh));
}
else
{
char_u *p1, *p2;
/* Find the last path separator before the space. */
p1 = p_sh;
for (p2 = p_sh; p2 < p; mb_ptr_adv(p2))
if (vim_ispathsep(*p2))
p1 = p2 + 1;
p = vim_strnsave(p1, (int)(p - p1));
}
#endif
if (p != NULL)
{
/*

View File

@@ -9780,10 +9780,16 @@ init_spell_chartab()
{
for (i = 128; i < 256; ++i)
{
int f = utf_fold(i);
int u = utf_toupper(i);
spelltab.st_isu[i] = utf_isupper(i);
spelltab.st_isw[i] = spelltab.st_isu[i] || utf_islower(i);
spelltab.st_fold[i] = utf_fold(i);
spelltab.st_upper[i] = utf_toupper(i);
/* The folded/upper-cased value is different between latin1 and
* utf8 for 0xb5, causing E763 for no good reason. Use the latin1
* value for utf-8 to avoid this. */
spelltab.st_fold[i] = (f < 256) ? f : i;
spelltab.st_upper[i] = (u < 256) ? u : i;
}
}
else

View File

@@ -7136,7 +7136,8 @@ do_highlight(line, forceit, init)
}
}
}
/* Add one to the argument, to avoid zero */
/* Add one to the argument, to avoid zero. Zero is used for
* "NONE", then "color" is -1. */
if (key[5] == 'F')
{
HL_TABLE()[idx].sg_cterm_fg = color + 1;
@@ -7150,7 +7151,7 @@ do_highlight(line, forceit, init)
#endif
{
must_redraw = CLEAR;
if (termcap_active)
if (termcap_active && color >= 0)
term_fg_color(color);
}
}
@@ -7167,16 +7168,21 @@ do_highlight(line, forceit, init)
#endif
{
must_redraw = CLEAR;
if (termcap_active)
term_bg_color(color);
if (t_colors < 16)
i = (color == 0 || color == 4);
else
i = (color < 7 || color == 8);
/* Set the 'background' option if the value is wrong. */
if (i != (*p_bg == 'd'))
set_option_value((char_u *)"bg", 0L,
i ? (char_u *)"dark" : (char_u *)"light", 0);
if (color >= 0)
{
if (termcap_active)
term_bg_color(color);
if (t_colors < 16)
i = (color == 0 || color == 4);
else
i = (color < 7 || color == 8);
/* Set the 'background' option if the value is
* wrong. */
if (i != (*p_bg == 'd'))
set_option_value((char_u *)"bg", 0L,
i ? (char_u *)"dark"
: (char_u *)"light", 0);
}
}
}
}

View File

@@ -681,6 +681,28 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
424,
/**/
423,
/**/
422,
/**/
421,
/**/
420,
/**/
419,
/**/
418,
/**/
417,
/**/
416,
/**/
415,
/**/
414,
/**/
413,
/**/