Very much like this issue, pressing tab when you have a block of code selected causes the last line to be deleted. To reproduce…
- Start with the following code:
do
--foo
end
- Move your cursor to the beginning of line 3.
- Hold shift, press up arrow twice. By now, you should have all of lines 1 & 2 selected, including the trailing newline after line 2. Additionally, your cursor should be at the beginning of line 1.
pictures
- Press tab. Witness the
end
disappear.
This started happening within the last week. The bug I linked was fixed, but then this appeared because of it.