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>
diff --git a/src/quickfix.c b/src/quickfix.c
index 3e2d3df..d8bcc12 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4839,8 +4839,7 @@
(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