vim-patch:8.1.1000: indenting is off

Problem:    Indenting is off.
Solution:   Make indenting consistent and update comments. (Ozaki Kiichi,
            closes vim/vim#4079)
fd731b0e31
This commit is contained in:
Jan Edmund Lazo
2019-05-31 23:58:08 -04:00
parent c6cd6081b8
commit a51f24fda3
2 changed files with 21 additions and 18 deletions

View File

@@ -1422,8 +1422,8 @@ int vgetc(void)
} }
/* a keypad or special function key was not mapped, use it like // a keypad or special function key was not mapped, use it like
* its ASCII equivalent */ // its ASCII equivalent
switch (c) { switch (c) {
case K_KPLUS: c = '+'; break; case K_KPLUS: c = '+'; break;
case K_KMINUS: c = '-'; break; case K_KMINUS: c = '-'; break;
@@ -1475,27 +1475,27 @@ int vgetc(void)
case K_XRIGHT: c = K_RIGHT; break; case K_XRIGHT: c = K_RIGHT; break;
} }
/* For a multi-byte character get all the bytes and return the // For a multi-byte character get all the bytes and return the
* converted character. // converted character.
* Note: This will loop until enough bytes are received! // Note: This will loop until enough bytes are received!
*/ if ((n = MB_BYTE2LEN_CHECK(c)) > 1) {
if (has_mbyte && (n = MB_BYTE2LEN_CHECK(c)) > 1) {
no_mapping++; no_mapping++;
buf[0] = (char_u)c; buf[0] = (char_u)c;
for (i = 1; i < n; i++) { for (i = 1; i < n; i++) {
buf[i] = (char_u)vgetorpeek(true); buf[i] = (char_u)vgetorpeek(true);
if (buf[i] == K_SPECIAL if (buf[i] == K_SPECIAL
) { ) {
/* Must be a K_SPECIAL - KS_SPECIAL - KE_FILLER sequence, // Must be a K_SPECIAL - KS_SPECIAL - KE_FILLER sequence,
* which represents a K_SPECIAL (0x80), // which represents a K_SPECIAL (0x80),
* or a CSI - KS_EXTRA - KE_CSI sequence, which represents // or a CSI - KS_EXTRA - KE_CSI sequence, which represents
* a CSI (0x9B), // a CSI (0x9B),
* of a K_SPECIAL - KS_EXTRA - KE_CSI, which is CSI too. */ // of a K_SPECIAL - KS_EXTRA - KE_CSI, which is CSI too.
c = vgetorpeek(TRUE); c = vgetorpeek(true);
if (vgetorpeek(TRUE) == (int)KE_CSI && c == KS_EXTRA) if (vgetorpeek(true) == (int)KE_CSI && c == KS_EXTRA) {
buf[i] = CSI; buf[i] = CSI;
} }
} }
}
no_mapping--; no_mapping--;
c = utf_ptr2char(buf); c = utf_ptr2char(buf);
} }

View File

@@ -983,13 +983,16 @@ do_execreg(
EMSG(_(e_nolastcmd)); EMSG(_(e_nolastcmd));
return FAIL; return FAIL;
} }
XFREE_CLEAR(new_last_cmdline); // don't keep the cmdline containing @: // don't keep the cmdline containing @:
XFREE_CLEAR(new_last_cmdline);
// Escape all control characters with a CTRL-V // Escape all control characters with a CTRL-V
p = vim_strsave_escaped_ext( p = vim_strsave_escaped_ext(
last_cmdline, last_cmdline,
(char_u *) (char_u *)"\001\002\003\004\005\006\007"
"\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037", "\010\011\012\013\014\015\016\017"
Ctrl_V, FALSE); "\020\021\022\023\024\025\026\027"
"\030\031\032\033\034\035\036\037",
Ctrl_V, false);
/* When in Visual mode "'<,'>" will be prepended to the command. /* When in Visual mode "'<,'>" will be prepended to the command.
* Remove it when it's already there. */ * Remove it when it's already there. */
if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0) if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0)