diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-03-14 11:35:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 11:35:05 +0100 |
commit | 4395b5f93aafce2660a3ecead3917ac2a28ef0b6 (patch) | |
tree | fddc5eb2c62d43fec8b0e00821ad2882e457c461 /src/nvim/help.c | |
parent | ef31444cccdd93f515a8b7a968268cb04e680370 (diff) | |
parent | 9ab814eafad4e7d3f34ef9e1f518339dddedfac2 (diff) | |
download | rneovim-4395b5f93aafce2660a3ecead3917ac2a28ef0b6.tar.gz rneovim-4395b5f93aafce2660a3ecead3917ac2a28ef0b6.tar.bz2 rneovim-4395b5f93aafce2660a3ecead3917ac2a28ef0b6.zip |
Merge pull request #22658 from clason/help-marks
fix(help): force tree reparse after local addition insertion
docs(help): consistent headers for local additions
Diffstat (limited to 'src/nvim/help.c')
-rw-r--r-- | src/nvim/help.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/help.c b/src/nvim/help.c index 968f0bc2f4..728c890da4 100644 --- a/src/nvim/help.c +++ b/src/nvim/help.c @@ -10,6 +10,7 @@ #include "nvim/ascii.h" #include "nvim/buffer.h" +#include "nvim/change.h" #include "nvim/charset.h" #include "nvim/cmdexpand.h" #include "nvim/ex_cmds.h" @@ -699,6 +700,8 @@ void fix_help_buffer(void) continue; } + int lnum_start = lnum; + // Go through all directories in 'runtimepath', skipping // $VIMRUNTIME. char *p = p_rtp; @@ -829,6 +832,11 @@ void fix_help_buffer(void) } xfree(rt); } + linenr_T appended = lnum - lnum_start; + if (appended) { + mark_adjust(lnum_start + 1, (linenr_T)MAXLNUM, appended, 0L, kExtmarkUndo); + changed_lines_buf(curbuf, lnum_start + 1, lnum_start + 1, appended); + } break; } } |