diff options
| author | bfredl <bjorn.linse@gmail.com> | 2024-01-22 21:05:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-22 21:05:12 +0100 |
| commit | 51f783f2faa2008bfb4136a15029a78efbc77715 (patch) | |
| tree | 5b365b7d3f9f00fdc19f1ac5f30645a2afa66396 /src/nvim/undo.c | |
| parent | 012cfced9b5384fefa11d74346779b1725106d07 (diff) | |
| parent | 9af2be292db3db7b28a6210263f719a6bbc4059f (diff) | |
| download | rneovim-51f783f2faa2008bfb4136a15029a78efbc77715.tar.gz rneovim-51f783f2faa2008bfb4136a15029a78efbc77715.tar.bz2 rneovim-51f783f2faa2008bfb4136a15029a78efbc77715.zip | |
Merge pull request #27011 from bfredl/metatree
perf(extmarks): add metadata for efficient filtering of special decorations
Diffstat (limited to 'src/nvim/undo.c')
| -rw-r--r-- | src/nvim/undo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index d517f07b32..11ebbb9bf1 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -67,6 +67,7 @@ // Uncomment the next line for including the u_check() function. This warns // for errors in the debug information. // #define U_DEBUG 1 +#include "nvim/marktree.h" #define UH_MAGIC 0x18dade // value for uh_magic when in use #define UE_MAGIC 0xabc123 // value for ue_magic when in use @@ -2390,7 +2391,7 @@ static void u_undoredo(bool undo, bool do_buf_event) // may have SpellCap that should be removed or it needs to be // displayed. Schedule the next line for redrawing just in case. // Also just in case the line had a sign which needs to be removed. - if ((spell_check_window(curwin) || curbuf->b_signs_with_text) + if ((spell_check_window(curwin) || buf_meta_total(curbuf, kMTMetaSignText)) && bot <= curbuf->b_ml.ml_line_count) { redrawWinline(curwin, bot); } @@ -2431,7 +2432,7 @@ static void u_undoredo(bool undo, bool do_buf_event) int row3 = -1; // Tricky: ExtmarkSavePos may come after ExtmarkSplice which does call // buf_signcols_count_range() but then misses the yet unrestored marks. - if (curbuf->b_signcols.autom && curbuf->b_signs_with_text) { + if (curbuf->b_signcols.autom && buf_meta_total(curbuf, kMTMetaSignText)) { for (int i = 0; i < (int)kv_size(curhead->uh_extmark); i++) { ExtmarkUndoObject undo_info = kv_A(curhead->uh_extmark, i); if (undo_info.type == kExtmarkSplice) { |