mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #13255 from janlazo/pvs-547-560
pvs: fix v547, v560 errors
This commit is contained in:
commit
94062831b3
@ -805,7 +805,7 @@ ArrayOf(String) nvim_get_runtime_file(String name, Boolean all, Error *err)
|
||||
}
|
||||
|
||||
int flags = DIP_START | (all ? DIP_ALL : 0);
|
||||
do_in_runtimepath(name.size ? (char_u *)name.data : NULL,
|
||||
do_in_runtimepath((char_u *)name.data,
|
||||
flags, find_runtime_cb, &rv);
|
||||
return rv;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ bool decor_redraw_start(buf_T *buf, int top_row, DecorState *state)
|
||||
Decoration *decor = item->decor;
|
||||
|
||||
if ((!(mark.id&MARKTREE_END_FLAG) && altpos.row < top_row
|
||||
&& item && !kv_size(decor->virt_text))
|
||||
&& !kv_size(decor->virt_text))
|
||||
|| ((mark.id&MARKTREE_END_FLAG) && altpos.row >= top_row)) {
|
||||
goto next_mark;
|
||||
}
|
||||
@ -251,7 +251,7 @@ int decor_redraw_col(buf_T *buf, int col, DecorState *state)
|
||||
|
||||
if (endpos.row < mark.row
|
||||
|| (endpos.row == mark.row && endpos.col <= mark.col)) {
|
||||
if (item && !kv_size(decor->virt_text)) {
|
||||
if (!kv_size(decor->virt_text)) {
|
||||
goto next_mark;
|
||||
}
|
||||
}
|
||||
|
@ -326,18 +326,18 @@ void marktree_del_itr(MarkTree *b, MarkTreeIter *itr, bool rev)
|
||||
x->n--;
|
||||
|
||||
// 4.
|
||||
if (adjustment) {
|
||||
if (adjustment == 1) {
|
||||
abort();
|
||||
} else { // adjustment == -1
|
||||
// if (adjustment == 1) {
|
||||
// abort();
|
||||
// }
|
||||
if (adjustment == -1) {
|
||||
int ilvl = itr->lvl-1;
|
||||
mtnode_t *lnode = x;
|
||||
const mtnode_t *lnode = x;
|
||||
do {
|
||||
mtnode_t *p = lnode->parent;
|
||||
const mtnode_t *const p = lnode->parent;
|
||||
if (ilvl < 0) {
|
||||
abort();
|
||||
}
|
||||
int i = itr->s[ilvl].i;
|
||||
const int i = itr->s[ilvl].i;
|
||||
assert(p->ptr[i] == lnode);
|
||||
if (i > 0) {
|
||||
unrelative(p->key[i-1].pos, &intkey.pos);
|
||||
@ -360,7 +360,6 @@ void marktree_del_itr(MarkTree *b, MarkTreeIter *itr, bool rev)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
b->n_keys--;
|
||||
pmap_del(uint64_t)(b->id2node, ANTIGRAVITY(id));
|
||||
@ -435,9 +434,10 @@ void marktree_del_itr(MarkTree *b, MarkTreeIter *itr, bool rev)
|
||||
|
||||
// BONUS STEP: fix the iterator, so that it points to the key afterwards
|
||||
// TODO(bfredl): with "rev" should point before
|
||||
if (adjustment == 1) {
|
||||
abort();
|
||||
} else if (adjustment == -1) {
|
||||
// if (adjustment == 1) {
|
||||
// abort();
|
||||
// }
|
||||
if (adjustment == -1) {
|
||||
// tricky: we stand at the deleted space in the previous leaf node.
|
||||
// But the inner key is now the previous key we stole, so we need
|
||||
// to skip that one as well.
|
||||
|
Loading…
Reference in New Issue
Block a user