diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-16 07:34:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 07:34:02 +0800 |
commit | 04dfa2eea914086a9f42a5a00a33e9524f9fded4 (patch) | |
tree | c6502c68406be5ae3ef88e292f81cff9f9d71ac2 /src/nvim/quickfix.c | |
parent | d60eeacae4ce4aa780636b90199ac20af609e91b (diff) | |
parent | 163add40b8b98b91dfb8eff589f49dc75f1032ea (diff) | |
download | rneovim-04dfa2eea914086a9f42a5a00a33e9524f9fded4.tar.gz rneovim-04dfa2eea914086a9f42a5a00a33e9524f9fded4.tar.bz2 rneovim-04dfa2eea914086a9f42a5a00a33e9524f9fded4.zip |
Merge pull request #27485 from zeertzjq/vim-9.1.0112
vim-patch:9.1.{0112,0113}
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 14758c8cea..651ebc9f93 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -68,6 +68,7 @@ #include "nvim/strings.h" #include "nvim/types_defs.h" #include "nvim/ui.h" +#include "nvim/undo.h" #include "nvim/vim_defs.h" #include "nvim/window.h" @@ -4142,6 +4143,12 @@ static void qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last, int q } // delete all existing lines + // + // Note: we cannot store undo information, because + // qf buffer is usually not allowed to be modified. + // + // So we need to clean up undo information + // otherwise autocommands may invalidate the undo stack while ((curbuf->b_ml.ml_flags & ML_EMPTY) == 0) { // If deletion fails, this loop may run forever, so // signal error and return. @@ -4150,6 +4157,9 @@ static void qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last, int q return; } } + + // Remove all undo information + u_clearallandblockfree(curbuf); } // Check if there is anything to display |