[SCM] Vim packaging branch, deb/langmap-escaped-comma, updated. upstream/7.2.130-47-gf211f1e
James Vega
jamessan at debian.org
Sat Apr 18 00:48:04 UTC 2009
The following commit has been merged in the deb/langmap-escaped-comma branch:
commit f211f1e91f4d02778ef2e36dc6d9f6d6093bd4a3
Merge: a84cd87199e3690299b3f80b21e8810073e11a1e df2c4ebd8177d0e7ab0b2a114e17ceaf2e18dd71
Author: James Vega <jamessan at debian.org>
Date: Fri Apr 17 11:13:42 2009 -0400
Merge branch 'upstream' into deb/langmap-escaped-comma
diff --combined src/option.c
index d3a5892,5e71c9b..78ed081
--- a/src/option.c
+++ b/src/option.c
@@@ -5797,14 -5797,28 +5797,28 @@@ did_set_string_option(opt_idx, varp, ne
/* load or unload key mapping tables */
errmsg = keymap_init();
- /* When successfully installed a new keymap switch on using it. */
- if (*curbuf->b_p_keymap != NUL && errmsg == NULL)
+ if (errmsg == NULL)
{
- curbuf->b_p_iminsert = B_IMODE_LMAP;
- if (curbuf->b_p_imsearch != B_IMODE_USE_INSERT)
- curbuf->b_p_imsearch = B_IMODE_LMAP;
- set_iminsert_global();
- set_imsearch_global();
+ if (*curbuf->b_p_keymap != NUL)
+ {
+ /* Installed a new keymap, switch on using it. */
+ curbuf->b_p_iminsert = B_IMODE_LMAP;
+ if (curbuf->b_p_imsearch != B_IMODE_USE_INSERT)
+ curbuf->b_p_imsearch = B_IMODE_LMAP;
+ }
+ else
+ {
+ /* Cleared the keymap, may reset 'iminsert' and 'imsearch'. */
+ if (curbuf->b_p_iminsert == B_IMODE_LMAP)
+ curbuf->b_p_iminsert = B_IMODE_NONE;
+ if (curbuf->b_p_imsearch == B_IMODE_LMAP)
+ curbuf->b_p_imsearch = B_IMODE_USE_INSERT;
+ }
+ if ((opt_flags & OPT_LOCAL) == 0)
+ {
+ set_iminsert_global();
+ set_imsearch_global();
+ }
# ifdef FEAT_WINDOWS
status_redraw_curbuf();
# endif
@@@ -6008,15 -6022,23 +6022,23 @@@
/* ":set t_Co=0" and ":set t_Co=1" do ":set t_Co=" */
if (varp == &T_CCO)
{
- t_colors = atoi((char *)T_CCO);
- if (t_colors <= 1)
+ int colors = atoi((char *)T_CCO);
+
+ /* Only reinitialize colors if t_Co value has really changed to
+ * avoid expensive reload of colorscheme if t_Co is set to the
+ * same value multiple times. */
+ if (colors != t_colors)
{
- if (new_value_alloced)
- vim_free(T_CCO);
- T_CCO = empty_option;
+ t_colors = colors;
+ if (t_colors <= 1)
+ {
+ if (new_value_alloced)
+ vim_free(T_CCO);
+ T_CCO = empty_option;
+ }
+ /* We now have a different color setup, initialize it again. */
+ init_highlight(TRUE, FALSE);
}
- /* We now have a different color setup, initialize it again. */
- init_highlight(TRUE, FALSE);
}
ttest(FALSE);
if (varp == &T_ME)
@@@ -7541,9 -7563,13 +7563,13 @@@ set_bool_option(opt_idx, varp, value, o
* set. */
if (STRCMP(p_enc, "utf-8") != 0)
{
+ static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'");
+
msg_source(hl_attr(HLF_W));
- MSG_ATTR(_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'"),
- hl_attr(HLF_W));
+ MSG_ATTR(_(w_arabic), hl_attr(HLF_W));
+ #ifdef FEAT_EVAL
+ set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1);
+ #endif
}
# ifdef FEAT_MBYTE
@@@ -10268,7 -10294,7 +10294,7 @@@ langmap_set(
{
char_u *p;
char_u *p2;
- int from, to;
+ int from=NUL, to=NUL;
#ifdef FEAT_MBYTE
ga_clear(&langmap_mapga); /* clear the previous map first */
@@@ -10289,11 -10315,6 +10315,11 @@@
p2 = NULL; /* aAbBcCdD form, p2 is NULL */
while (p[0])
{
+ if (p[0] == ',')
+ {
+ ++p;
+ break;
+ }
if (p[0] == '\\' && p[1] != NUL)
++p;
#ifdef FEAT_MBYTE
@@@ -10304,29 -10325,23 +10330,29 @@@
if (p2 == NULL)
{
mb_ptr_adv(p);
- if (p[0] == '\\')
- ++p;
+ if (p[0] != ',')
+ {
+ if (p[0] == '\\')
+ ++p;
#ifdef FEAT_MBYTE
- to = (*mb_ptr2char)(p);
+ to = (*mb_ptr2char)(p);
#else
- to = p[0];
+ to = p[0];
#endif
+ }
}
else
{
- if (p2[0] == '\\')
- ++p2;
+ if (p2[0] != ',')
+ {
+ if (p2[0] == '\\')
+ ++p2;
#ifdef FEAT_MBYTE
- to = (*mb_ptr2char)(p2);
+ to = (*mb_ptr2char)(p2);
#else
- to = p2[0];
+ to = p2[0];
#endif
+ }
}
if (to == NUL)
{
--
Vim packaging
More information about the pkg-vim-maintainers
mailing list