aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/extmark.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-01-13 18:10:53 +0100
committerGitHub <noreply@github.com>2024-01-13 18:10:53 +0100
commitbab5e7fe17db67aa24115eeb44fc68905b107d9e (patch)
treee7329cb9ddda0a046b5f75b550b766708143c473 /src/nvim/extmark.c
parent2dc439c672facaeb8e51ef6aa20efc0e7092eee2 (diff)
parent4f544b31197e7d543e0fa315948991e830b41ba8 (diff)
downloadrneovim-bab5e7fe17db67aa24115eeb44fc68905b107d9e.tar.gz
rneovim-bab5e7fe17db67aa24115eeb44fc68905b107d9e.tar.bz2
rneovim-bab5e7fe17db67aa24115eeb44fc68905b107d9e.zip
Merge pull request #26869 from luukvbaal/decor
refactor: minor decor refactors
Diffstat (limited to 'src/nvim/extmark.c')
-rw-r--r--src/nvim/extmark.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c
index 583d7eb061..a5f669acde 100644
--- a/src/nvim/extmark.c
+++ b/src/nvim/extmark.c
@@ -332,9 +332,6 @@ void extmark_splice_delete(buf_T *buf, int l_row, colnr_T l_col, int u_row, coln
// Invalidate/delete mark
if (!only_copy && !mt_invalid(mark) && mt_invalidate(mark) && !mt_end(mark)) {
MTPos endpos = marktree_get_altpos(buf->b_marktree, mark, NULL);
- if (endpos.row < 0) {
- endpos = mark.pos;
- }
// Invalidate unpaired marks in deleted lines and paired marks whose entire
// range has been deleted.
if ((!mt_paired(mark) && mark.pos.row < u_row)
@@ -404,7 +401,7 @@ void extmark_apply_undo(ExtmarkUndoObject undo_info, bool undo)
MTKey mark = marktree_lookup(curbuf->b_marktree, pos.mark, itr);
mt_itr_rawkey(itr).flags &= (uint16_t) ~MT_FLAG_INVALID;
MTPos end = marktree_get_altpos(curbuf->b_marktree, mark, itr);
- buf_put_decor(curbuf, mt_decor(mark), mark.pos.row, end.row < 0 ? mark.pos.row : end.row);
+ buf_put_decor(curbuf, mt_decor(mark), mark.pos.row, end.row);
}
// Redo
} else {