mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 22:08:18 +00:00
*: Fix clint errors
This commit is contained in:
@@ -2918,7 +2918,7 @@ void maketitle(void)
|
|||||||
int save_called_emsg = called_emsg;
|
int save_called_emsg = called_emsg;
|
||||||
|
|
||||||
use_sandbox = was_set_insecurely((char_u *)"titlestring", 0);
|
use_sandbox = was_set_insecurely((char_u *)"titlestring", 0);
|
||||||
called_emsg = FALSE;
|
called_emsg = false;
|
||||||
build_stl_str_hl(curwin, (char_u *)buf, sizeof(buf),
|
build_stl_str_hl(curwin, (char_u *)buf, sizeof(buf),
|
||||||
p_titlestring, use_sandbox,
|
p_titlestring, use_sandbox,
|
||||||
0, maxlen, NULL, NULL);
|
0, maxlen, NULL, NULL);
|
||||||
@@ -3005,7 +3005,7 @@ void maketitle(void)
|
|||||||
append_arg_number(curwin, (char_u *)buf_p,
|
append_arg_number(curwin, (char_u *)buf_p,
|
||||||
(int)(SPACE_FOR_ARGNR - (size_t)(buf_p - buf)), false);
|
(int)(SPACE_FOR_ARGNR - (size_t)(buf_p - buf)), false);
|
||||||
|
|
||||||
strcat(buf_p, " - NVIM");
|
xstrlcat(buf_p, " - NVIM", (sizeof(buf) - (size_t)(buf_p - buf)));
|
||||||
|
|
||||||
if (maxlen > 0) {
|
if (maxlen > 0) {
|
||||||
// Make it shorter by removing a bit in the middle.
|
// Make it shorter by removing a bit in the middle.
|
||||||
|
@@ -4851,10 +4851,10 @@ void ExpandGeneric(
|
|||||||
count = 0;
|
count = 0;
|
||||||
for (i = 0;; i++) {
|
for (i = 0;; i++) {
|
||||||
str = (*func)(xp, i);
|
str = (*func)(xp, i);
|
||||||
if (str == NULL) { // end of list
|
if (str == NULL) { // End of list.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*str == NUL) { // skip empty strings
|
if (*str == NUL) { // Skip empty strings.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (vim_regexec(regmatch, str, (colnr_T)0)) {
|
if (vim_regexec(regmatch, str, (colnr_T)0)) {
|
||||||
|
@@ -286,7 +286,7 @@ readfile (
|
|||||||
off_T filesize = 0;
|
off_T filesize = 0;
|
||||||
int skip_read = false;
|
int skip_read = false;
|
||||||
context_sha256_T sha_ctx;
|
context_sha256_T sha_ctx;
|
||||||
int read_undo_file = FALSE;
|
int read_undo_file = false;
|
||||||
linenr_T linecnt;
|
linenr_T linecnt;
|
||||||
int error = FALSE; /* errors encountered */
|
int error = FALSE; /* errors encountered */
|
||||||
int ff_error = EOL_UNKNOWN; /* file format with errors */
|
int ff_error = EOL_UNKNOWN; /* file format with errors */
|
||||||
|
@@ -3595,7 +3595,6 @@ int do_join(size_t count,
|
|||||||
// We don't want to remove the comment leader if the
|
// We don't want to remove the comment leader if the
|
||||||
// previous line is not a comment.
|
// previous line is not a comment.
|
||||||
if (t > 0 && prev_was_comment) {
|
if (t > 0 && prev_was_comment) {
|
||||||
|
|
||||||
char_u *new_curr = skip_comment(curr, true, insert_space,
|
char_u *new_curr = skip_comment(curr, true, insert_space,
|
||||||
&prev_was_comment);
|
&prev_was_comment);
|
||||||
comments[t] = (int)(new_curr - curr);
|
comments[t] = (int)(new_curr - curr);
|
||||||
|
@@ -822,11 +822,11 @@ size_t home_replace(const buf_T *const buf, const char_u *src,
|
|||||||
|
|
||||||
// if (!one) skip to separator: space or comma.
|
// if (!one) skip to separator: space or comma.
|
||||||
while (*src && (one || (*src != ',' && *src != ' ')) && --dstlen > 0) {
|
while (*src && (one || (*src != ',' && *src != ' ')) && --dstlen > 0) {
|
||||||
*dst_p++ = (char)*src++;
|
*dst_p++ = (char)(*src++);
|
||||||
}
|
}
|
||||||
// Skip separator.
|
// Skip separator.
|
||||||
while ((*src == ' ' || *src == ',') && --dstlen > 0) {
|
while ((*src == ' ' || *src == ',') && --dstlen > 0) {
|
||||||
*dst_p++ = (char)*src++;
|
*dst_p++ = (char)(*src++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If (dstlen == 0) out of space, what to do???
|
// If (dstlen == 0) out of space, what to do???
|
||||||
|
@@ -4738,7 +4738,7 @@ void ex_helpgrep(exarg_T *eap)
|
|||||||
regmatch.regprog = vim_regcomp(eap->arg, RE_MAGIC + RE_STRING);
|
regmatch.regprog = vim_regcomp(eap->arg, RE_MAGIC + RE_STRING);
|
||||||
regmatch.rm_ic = FALSE;
|
regmatch.rm_ic = FALSE;
|
||||||
if (regmatch.regprog != NULL) {
|
if (regmatch.regprog != NULL) {
|
||||||
/* create a new quickfix list */
|
// Create a new quickfix list.
|
||||||
qf_new_list(qi, *eap->cmdlinep);
|
qf_new_list(qi, *eap->cmdlinep);
|
||||||
|
|
||||||
/* Go through all directories in 'runtimepath' */
|
/* Go through all directories in 'runtimepath' */
|
||||||
|
@@ -6367,7 +6367,7 @@ static void linecopy(int to, int from, win_T *wp)
|
|||||||
wp->w_width * sizeof(ScreenLines[0]));
|
wp->w_width * sizeof(ScreenLines[0]));
|
||||||
|
|
||||||
memmove(ScreenLinesUC + off_to, ScreenLinesUC + off_from,
|
memmove(ScreenLinesUC + off_to, ScreenLinesUC + off_from,
|
||||||
wp->w_width * sizeof(u8char_T));
|
wp->w_width * sizeof(ScreenLinesUC[0]));
|
||||||
for (int i = 0; i < p_mco; i++) {
|
for (int i = 0; i < p_mco; i++) {
|
||||||
memmove(ScreenLinesC[i] + off_to, ScreenLinesC[i] + off_from,
|
memmove(ScreenLinesC[i] + off_to, ScreenLinesC[i] + off_from,
|
||||||
wp->w_width * sizeof(ScreenLinesC[0]));
|
wp->w_width * sizeof(ScreenLinesC[0]));
|
||||||
|
@@ -4561,7 +4561,7 @@ syn_cmd_region (
|
|||||||
item = ITEM_END;
|
item = ITEM_END;
|
||||||
} else if (STRCMP(key, "SKIP") == 0) {
|
} else if (STRCMP(key, "SKIP") == 0) {
|
||||||
if (pat_ptrs[ITEM_SKIP] != NULL) { // One skip pattern allowed.
|
if (pat_ptrs[ITEM_SKIP] != NULL) { // One skip pattern allowed.
|
||||||
illegal = TRUE;
|
illegal = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
item = ITEM_SKIP;
|
item = ITEM_SKIP;
|
||||||
|
@@ -605,8 +605,7 @@ static void cursor_goto(UI *ui, int row, int col)
|
|||||||
int n = col - grid->col;
|
int n = col - grid->col;
|
||||||
if (n <= (row == grid->row ? 4 : 2)
|
if (n <= (row == grid->row ? 4 : 2)
|
||||||
&& cheap_to_print(ui, grid->row, grid->col, n)) {
|
&& cheap_to_print(ui, grid->row, grid->col, n)) {
|
||||||
UGRID_FOREACH_CELL(grid, grid->row, grid->row,
|
UGRID_FOREACH_CELL(grid, grid->row, grid->row, grid->col, col - 1, {
|
||||||
grid->col, col - 1, {
|
|
||||||
print_cell(ui, cell);
|
print_cell(ui, cell);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user