mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.1-185
This commit is contained in:
19
src/edit.c
19
src/edit.c
@@ -6939,6 +6939,25 @@ replace_push(c)
|
|||||||
++replace_stack_nr;
|
++replace_stack_nr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FEAT_MBYTE) || defined(PROTO)
|
||||||
|
/*
|
||||||
|
* Push a character onto the replace stack. Handles a multi-byte character in
|
||||||
|
* reverse byte order, so that the first byte is popped off first.
|
||||||
|
* Return the number of bytes done (includes composing characters).
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
replace_push_mb(p)
|
||||||
|
char_u *p;
|
||||||
|
{
|
||||||
|
int l = (*mb_ptr2len)(p);
|
||||||
|
int j;
|
||||||
|
|
||||||
|
for (j = l - 1; j >= 0; --j)
|
||||||
|
replace_push(p[j]);
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/*
|
/*
|
||||||
* call replace_push(c) with replace_offset set to the first NUL.
|
* call replace_push(c) with replace_offset set to the first NUL.
|
||||||
|
20
src/misc1.c
20
src/misc1.c
@@ -591,7 +591,14 @@ open_line(dir, flags, old_indent)
|
|||||||
replace_push(NUL);
|
replace_push(NUL);
|
||||||
p = saved_line + curwin->w_cursor.col;
|
p = saved_line + curwin->w_cursor.col;
|
||||||
while (*p != NUL)
|
while (*p != NUL)
|
||||||
replace_push(*p++);
|
{
|
||||||
|
#ifdef FEAT_MBYTE
|
||||||
|
if (has_mbyte)
|
||||||
|
p += replace_push_mb(p);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
replace_push(*p++);
|
||||||
|
}
|
||||||
saved_line[curwin->w_cursor.col] = NUL;
|
saved_line[curwin->w_cursor.col] = NUL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1914,7 +1921,6 @@ ins_char_bytes(buf, charlen)
|
|||||||
int charlen;
|
int charlen;
|
||||||
{
|
{
|
||||||
int c = buf[0];
|
int c = buf[0];
|
||||||
int l, j;
|
|
||||||
#endif
|
#endif
|
||||||
int newlen; /* nr of bytes inserted */
|
int newlen; /* nr of bytes inserted */
|
||||||
int oldlen; /* nr of bytes deleted (0 when not replacing) */
|
int oldlen; /* nr of bytes deleted (0 when not replacing) */
|
||||||
@@ -2016,13 +2022,11 @@ ins_char_bytes(buf, charlen)
|
|||||||
for (i = 0; i < oldlen; ++i)
|
for (i = 0; i < oldlen; ++i)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
l = (*mb_ptr2len)(oldp + col + i) - 1;
|
if (has_mbyte)
|
||||||
for (j = l; j >= 0; --j)
|
i += replace_push_mb(oldp + col + i) - 1;
|
||||||
replace_push(oldp[col + i + j]);
|
else
|
||||||
i += l;
|
|
||||||
#else
|
|
||||||
replace_push(oldp[col + i]);
|
|
||||||
#endif
|
#endif
|
||||||
|
replace_push(oldp[col + i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,6 +32,7 @@ int stuff_inserted __ARGS((int c, long count, int no_esc));
|
|||||||
char_u *get_last_insert __ARGS((void));
|
char_u *get_last_insert __ARGS((void));
|
||||||
char_u *get_last_insert_save __ARGS((void));
|
char_u *get_last_insert_save __ARGS((void));
|
||||||
void replace_push __ARGS((int c));
|
void replace_push __ARGS((int c));
|
||||||
|
int replace_push_mb __ARGS((char_u *p));
|
||||||
void fixthisline __ARGS((int (*get_the_indent)(void)));
|
void fixthisline __ARGS((int (*get_the_indent)(void)));
|
||||||
void fix_indent __ARGS((void));
|
void fix_indent __ARGS((void));
|
||||||
int in_cinkeys __ARGS((int keytyped, int when, int line_is_empty));
|
int in_cinkeys __ARGS((int keytyped, int when, int line_is_empty));
|
||||||
|
@@ -666,6 +666,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
185,
|
||||||
/**/
|
/**/
|
||||||
184,
|
184,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user