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: vim/vim#13928

9071ed8107

Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2024-02-16 06:56:12 +08:00
parent c1fa8789c1
commit 163add40b8
4 changed files with 27 additions and 20 deletions

View File

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