Unfold range when deleting characters at the end/start of the folded range

Hi!

When the cursor is positioned immediately after a folded range and I press backspace, the last character of the folded range gets deleted, but the folded range doesn’t get unfolded like it would if I pressed the left arrow key, or if I pressed backspace with the cursor within the folded range.

Same if I press delete with the cursor immediately before the range.

Wouldn’t it make sense to unfold the range when a character in the folded range gets deleted? Otherwise you could accidentally delete characters within the fold without realising it, since you don’t get any visual clues.

Indeed, that’s odd. This patch should help.

Nice, thanks! :tada: