monome / maiden

web based editor and repl for norns
GNU General Public License v3.0
47 stars 34 forks source link

auto-indented spaces before `end` aren't removed #79

Open artfwo opened 6 years ago

artfwo commented 6 years ago

having a minor problem with the editor: when i start to type a block of code (an if statement), newline after then is indented. typing end on a next line doesn't remove the indentation though. can be reproduced by typing the following snippet:

if a then
  end
pq commented 6 years ago

👍 i've been annoyed by this too.

i'm not sure there's an easy fix but i'll look; most likely the key to fixing this is to hack our own lua mode (#78) since that's where indent-level is set