summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorHugo Musso Gualandi <hugo_musso_gualandi@hotmail.com>2021-09-11 00:51:12 -0300
committerHugo Musso Gualandi <hugo_musso_gualandi@hotmail.com>2021-09-11 01:29:01 -0300
commitaa1a2803093348e4d18244af7c9785c32041abbe (patch)
tree6d21d3c501ecf5f31effe9260add93de5dbb678e /src/input_handler.cc
parent8755fc679e265727ed5cb858c156dfdba51ae718 (diff)
lua.kak: more accurate "end" insertion
- Also insert "end" after "do", "else" and "elseif" - Do not insert "end" after strings or comments containing keywords - Only insert "end" if the block is empty An example of the last item is if we want to add a new line to the start of an unclosed block that already contains statements. @ is the cursor. -- before if a then@ x = 1 y = 2 -- after if a then @ end x = 1 y = 2 In this case, inserting the "end" before the statements is probably not what the programmer wants. It might make more sense to insert the "end" after the statements, but that is potentially confusing due to spooky action at a distance. I think the least confusing thing to do in this situation is to not insert the "end".
Diffstat (limited to 'src/input_handler.cc')
0 files changed, 0 insertions, 0 deletions