mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
vim-patch:7.4.2049
Problem: There is no way to get a list of the error lists.
Solution: Add ":chistory" and ":lhistory".
f6acffbe83
This commit is contained in:
@@ -297,8 +297,22 @@ void trunc_string(char_u *s, char_u *buf, int room, int buflen)
|
||||
len += n;
|
||||
}
|
||||
|
||||
/* Set the middle and copy the last part. */
|
||||
if (e + 3 < buflen) {
|
||||
if (i <= e + 3) {
|
||||
// text fits without truncating
|
||||
if (s != buf) {
|
||||
len = STRLEN(s);
|
||||
if (len >= buflen) {
|
||||
len = buflen - 1;
|
||||
}
|
||||
len = len - e + 1;
|
||||
if (len < 1) {
|
||||
buf[e - 1] = NUL;
|
||||
} else {
|
||||
memmove(buf + e, s + e, len);
|
||||
}
|
||||
}
|
||||
} else if (e + 3 < buflen) {
|
||||
// set the middle and copy the last part
|
||||
memmove(buf + e, "...", (size_t)3);
|
||||
len = (int)STRLEN(s + i) + 1;
|
||||
if (len >= buflen - e - 3)
|
||||
@@ -306,7 +320,8 @@ void trunc_string(char_u *s, char_u *buf, int room, int buflen)
|
||||
memmove(buf + e + 3, s + i, len);
|
||||
buf[e + 3 + len - 1] = NUL;
|
||||
} else {
|
||||
buf[e - 1] = NUL; /* make sure it is truncated */
|
||||
// can't fit in the "...", just truncate it
|
||||
buf[e - 1] = NUL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user