diff options
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r-- | src/nvim/mark.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c index 2402ea3035..0bf5875269 100644 --- a/src/nvim/mark.c +++ b/src/nvim/mark.c @@ -607,6 +607,8 @@ void mark_view_restore(fmark_T *fm) { if (fm != NULL && fm->view.topline_offset >= 0) { linenr_T topline = fm->mark.lnum - fm->view.topline_offset; + // If the mark does not have a view, topline_offset is MAXLNUM, + // and this check can prevent restoring mark view in that case. if (topline >= 1) { set_topline(curwin, topline); } |