1
0
forked from aniani/vim

patch 9.1.0113: duplicate code when cleaning undo stack

Problem:  duplicate code when cleaning undo stack
Solution: refactor undo cleanup into a single public function

related: #13928

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-02-15 20:17:37 +01:00
parent f0d3d4a426
commit 9071ed8107
7 changed files with 36 additions and 28 deletions

View File

@@ -4839,8 +4839,7 @@ qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last, int qf_winid)
(void)ml_delete((linenr_T)1);
// Remove all undo information
u_blockfree(curbuf);
u_clearall(curbuf);
u_clearallandblockfree(curbuf);
}
// Check if there is anything to display