comparison src/quickfix.c @ 34365:8303936dbd64 v9.1.0113

patch 9.1.0113: duplicate code when cleaning undo stack Commit: https://github.com/vim/vim/commit/9071ed8107244e0c56a16b77d1c28e975cb21dd2 Author: Christian Brabandt <cb@256bit.org> Date: Thu Feb 15 20:17:37 2024 +0100 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>
author Christian Brabandt <cb@256bit.org>
date Thu, 15 Feb 2024 20:30:05 +0100
parents 3b654f4462c5
children dd8f5311cee5
comparison
equal deleted inserted replaced
34364:f5d16cbbf2d5 34365:8303936dbd64
4837 // otherwise autocommands may invalidate the undo stack 4837 // otherwise autocommands may invalidate the undo stack
4838 while ((curbuf->b_ml.ml_flags & ML_EMPTY) == 0) 4838 while ((curbuf->b_ml.ml_flags & ML_EMPTY) == 0)
4839 (void)ml_delete((linenr_T)1); 4839 (void)ml_delete((linenr_T)1);
4840 4840
4841 // Remove all undo information 4841 // Remove all undo information
4842 u_blockfree(curbuf); 4842 u_clearallandblockfree(curbuf);
4843 u_clearall(curbuf);
4844 } 4843 }
4845 4844
4846 // Check if there is anything to display 4845 // Check if there is anything to display
4847 if (qfl != NULL && qfl->qf_start != NULL) 4846 if (qfl != NULL && qfl->qf_start != NULL)
4848 { 4847 {