From 18766e742bdc8d179ff73b739a530052c9a669e5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 8 Aug 2022 06:07:59 +0800 Subject: fix(folds): fix fold remains when :delete makes buffer empty (#19673) --- test/functional/ui/fold_spec.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index c79fc2989c..6bb8bb81c6 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -1904,4 +1904,11 @@ describe("folded lines", function() describe('without ext_multigrid', function() with_ext_multigrid(false) end) + + it('no folds remains if :delete makes buffer empty #19671', function() + funcs.setline(1, {'foo', 'bar', 'baz'}) + command('2,3fold') + command('%delete') + eq(0, funcs.foldlevel(1)) + end) end) -- cgit