parinfer / parinfer.js

Let's simplify the way we write Lisp
https://shaunlebron.github.io/parinfer
MIT License
1.75k stars 40 forks source link

don't accumulate extra indentation when `changes` indents multiple lines #154

Closed shaunlebron closed 7 years ago

shaunlebron commented 7 years ago

In the demo editor, you can select both lines and hit tab:

(foo
  bar)

This will result in:

  (foo
      bar) ; <-- accumulated the auto-indent from line 1 and the manual indent for line2

bar is over-indented because it maintained relative indentation inside (foo before shifting again due to manual indentation from changes.