0
0
mirror of https://github.com/vim/vim.git synced 2025-09-01 21:03:39 -04:00

updated for version 7.1-104

This commit is contained in:
Bram Moolenaar 2007-09-13 16:26:47 +00:00
parent a84b10685c
commit 61abfd1171
9 changed files with 48 additions and 31 deletions

View File

@ -2028,7 +2028,7 @@ get_digraph(cmdline)
++no_mapping;
++allow_keys;
c = safe_vgetc();
c = plain_vgetc();
--no_mapping;
--allow_keys;
if (c != ESC) /* ESC cancels CTRL-K */
@ -2050,7 +2050,7 @@ get_digraph(cmdline)
#endif
++no_mapping;
++allow_keys;
cc = safe_vgetc();
cc = plain_vgetc();
--no_mapping;
--allow_keys;
if (cc != ESC) /* ESC cancels CTRL-K */
@ -2350,7 +2350,7 @@ keymap_init()
if (*curbuf->b_p_keymap == NUL)
{
/* Stop any active keymap and clear the table. Also remove
* b:keymap_unload, as no keymap is active now. */
* b:keymap_name, as no keymap is active now. */
keymap_unload();
do_cmdline_cmd((char_u *)"unlet! b:keymap_name");
}

View File

@ -788,7 +788,7 @@ edit(cmdchar, startln, count)
ins_redraw(FALSE);
++no_mapping;
++allow_keys;
c = safe_vgetc();
c = plain_vgetc();
--no_mapping;
--allow_keys;
if (c != Ctrl_N && c != Ctrl_G && c != Ctrl_O)
@ -981,7 +981,7 @@ doESCkey:
#ifdef FEAT_NETBEANS_INTG
case K_F21: /* NetBeans command */
++no_mapping; /* don't map the next key hits */
i = safe_vgetc();
i = plain_vgetc();
--no_mapping;
netbeans_keycommand(i);
break;
@ -5224,10 +5224,7 @@ get_literal()
i = 0;
for (;;)
{
do
nc = safe_vgetc();
while (nc == K_IGNORE || nc == K_VER_SCROLLBAR
|| nc == K_HOR_SCROLLBAR);
nc = plain_vgetc();
#ifdef FEAT_CMDL_INFO
if (!(State & CMDLINE)
# ifdef FEAT_MBYTE
@ -7575,7 +7572,7 @@ ins_reg()
* deleted when ESC is hit.
*/
++no_mapping;
regname = safe_vgetc();
regname = plain_vgetc();
#ifdef FEAT_LANGMAP
LANGMAP_ADJUST(regname, TRUE);
#endif
@ -7586,7 +7583,7 @@ ins_reg()
#ifdef FEAT_CMDL_INFO
add_to_showcmd_c(literally);
#endif
regname = safe_vgetc();
regname = plain_vgetc();
#ifdef FEAT_LANGMAP
LANGMAP_ADJUST(regname, TRUE);
#endif
@ -7677,7 +7674,7 @@ ins_ctrl_g()
* deleted when ESC is hit.
*/
++no_mapping;
c = safe_vgetc();
c = plain_vgetc();
--no_mapping;
switch (c)
{
@ -9356,7 +9353,7 @@ ins_digraph()
* mode message to be deleted when ESC is hit */
++no_mapping;
++allow_keys;
c = safe_vgetc();
c = plain_vgetc();
--no_mapping;
--allow_keys;
if (IS_SPECIAL(c) || mod_mask) /* special key */
@ -9388,7 +9385,7 @@ ins_digraph()
}
++no_mapping;
++allow_keys;
cc = safe_vgetc();
cc = plain_vgetc();
--no_mapping;
--allow_keys;
if (cc != ESC)

View File

@ -4498,7 +4498,7 @@ do_sub(eap)
*
* The new text is built up in new_start[]. It has some extra
* room to avoid using alloc()/free() too often. new_start_len is
* the lenght of the allocated memory at new_start.
* the length of the allocated memory at new_start.
*
* Make a copy of the old line, so it won't be taken away when
* updating the screen or handling a multi-line match. The "old_"
@ -4669,7 +4669,7 @@ do_sub(eap)
#endif
++no_mapping; /* don't map this key */
++allow_keys; /* allow special keys */
i = safe_vgetc();
i = plain_vgetc();
--allow_keys;
--no_mapping;

View File

@ -641,7 +641,7 @@ getcmdline(firstc, count, indent)
{
++no_mapping;
++allow_keys;
c = safe_vgetc();
c = plain_vgetc();
--no_mapping;
--allow_keys;
/* CTRL-\ e doesn't work when obtaining an expression. */
@ -1091,11 +1091,11 @@ getcmdline(firstc, count, indent)
#endif
putcmdline('"', TRUE);
++no_mapping;
i = c = safe_vgetc(); /* CTRL-R <char> */
i = c = plain_vgetc(); /* CTRL-R <char> */
if (i == Ctrl_O)
i = Ctrl_R; /* CTRL-R CTRL-O == CTRL-R CTRL-R */
if (i == Ctrl_R)
c = safe_vgetc(); /* CTRL-R CTRL-R <char> */
c = plain_vgetc(); /* CTRL-R CTRL-R <char> */
--no_mapping;
#ifdef FEAT_EVAL
/*

View File

@ -1597,12 +1597,13 @@ vgetc()
}
#endif
#ifdef FEAT_GUI
/* The caller doesn't need to know that the focus event is delayed
* until getting a character. */
/* Handle focus event here, so that the caller doesn't need to
* know about it. Return K_IGNORE so that we loop once (needed if
* 'lazyredraw' is set). */
if (c == K_FOCUSGAINED || c == K_FOCUSLOST)
{
ui_focus_change(c == K_FOCUSGAINED);
continue;
c = K_IGNORE;
}
/* Translate K_CSI to CSI. The special key is only used to avoid
@ -1747,6 +1748,22 @@ safe_vgetc()
return c;
}
/*
* Like safe_vgetc(), but loop to handle K_IGNORE.
* Also ignore scrollbar events.
*/
int
plain_vgetc()
{
int c;
do
{
c = safe_vgetc();
} while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
return c;
}
/*
* Check if a character is available, such that vgetc() will not block.
* If the next character is a special character or multi-byte, the returned

View File

@ -696,7 +696,7 @@ getcount:
++allow_keys; /* no mapping for nchar, but keys */
}
++no_zero_mapping; /* don't map zero here */
c = safe_vgetc();
c = plain_vgetc();
#ifdef FEAT_LANGMAP
LANGMAP_ADJUST(c, TRUE);
#endif
@ -721,7 +721,7 @@ getcount:
ca.count0 = 0;
++no_mapping;
++allow_keys; /* no mapping for nchar, but keys */
c = safe_vgetc(); /* get next character */
c = plain_vgetc(); /* get next character */
#ifdef FEAT_LANGMAP
LANGMAP_ADJUST(c, TRUE);
#endif
@ -900,7 +900,7 @@ getcount:
* For 'g' get the next character now, so that we can check for
* "gr", "g'" and "g`".
*/
ca.nchar = safe_vgetc();
ca.nchar = plain_vgetc();
#ifdef FEAT_LANGMAP
LANGMAP_ADJUST(ca.nchar, TRUE);
#endif
@ -957,7 +957,7 @@ getcount:
im_set_active(TRUE);
#endif
*cp = safe_vgetc();
*cp = plain_vgetc();
if (langmap_active)
{
@ -1045,7 +1045,7 @@ getcount:
}
if (c > 0)
{
c = safe_vgetc();
c = plain_vgetc();
if (c != Ctrl_N && c != Ctrl_G)
vungetc(c);
else
@ -1064,7 +1064,7 @@ getcount:
while (enc_utf8 && lang && (c = vpeekc()) > 0
&& (c >= 0x100 || MB_BYTE2LEN(vpeekc()) > 1))
{
c = safe_vgetc();
c = plain_vgetc();
if (!utf_iscomposing(c))
{
vungetc(c); /* it wasn't, put it back */
@ -4564,7 +4564,7 @@ nv_zet(cap)
#endif
++no_mapping;
++allow_keys; /* no mapping for nchar, but allow key codes */
nchar = safe_vgetc();
nchar = plain_vgetc();
#ifdef FEAT_LANGMAP
LANGMAP_ADJUST(nchar, TRUE);
#endif
@ -4922,7 +4922,7 @@ dozet:
case 'u': /* "zug" and "zuw": undo "zg" and "zw" */
++no_mapping;
++allow_keys; /* no mapping for nchar, but allow key codes */
nchar = safe_vgetc();
nchar = plain_vgetc();
#ifdef FEAT_LANGMAP
LANGMAP_ADJUST(nchar, TRUE);
#endif

View File

@ -38,6 +38,7 @@ void before_blocking __ARGS((void));
void updatescript __ARGS((int c));
int vgetc __ARGS((void));
int safe_vgetc __ARGS((void));
int plain_vgetc __ARGS((void));
int vpeekc __ARGS((void));
int vpeekc_nomap __ARGS((void));
int vpeekc_any __ARGS((void));

View File

@ -666,6 +666,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
104,
/**/
103,
/**/

View File

@ -584,7 +584,7 @@ wingotofile:
++no_mapping;
++allow_keys; /* no mapping for xchar, but allow key codes */
if (xchar == NUL)
xchar = safe_vgetc();
xchar = plain_vgetc();
#ifdef FEAT_LANGMAP
LANGMAP_ADJUST(xchar, TRUE);
#endif