simplify autopadding on opening delimiter
commitb4a3a99b58d9b287f4b667375b08c6dec6dcd3f7
authorGeorgi Kirilov <>
Sat, 31 Oct 2020 09:50:47 +0000 (31 11:50 +0200)
committerGeorgi Kirilov <>
Fri, 19 May 2023 15:22:54 +0000 (19 18:22 +0300)
tree27ee3e42946a070707502f315554c6a37b5ec8c5
parente4e30d2841d2b525918c307a51bd1731a7de6864
simplify autopadding on opening delimiter

Instead of manually calculating the amount and position of padding,
just call reindent_at().

Pros:
 - less code and less bugs (this commit actually fixes at least two)
 - #|block comments|# get autopadded, too

Cons:
 - the top-level padding with an empty line doesn't work anymore.
   (although I could have kept doing it here)
 - The opening delimiter characters are consumed by the event handler
   and other plugins don't get the chance to handle them.
input.lua