ccw-ide / ccw

Counterclockwise is an Eclipse plugin helping developers write Clojure code
https://github.com/laurentpetit/ccw/wiki/GoogleCodeHome
Eclipse Public License 1.0
218 stars 49 forks source link

barf broken; getting }{ / ][ / )(. #864

Open gilch opened 8 years ago

gilch commented 8 years ago

Barf gets the brackets backwards if the result is empty. Example:

; '|' is cursor
(1 2 3 [|] 4 5 6)
; C-0 s
(1 2 3 [|  4] 5 6)
; C-0 b
(1 2 3 ]|[ 4 5 6)
; this is no longer valid structure.

What probably should have happened:

(1 2 3 [|] 4 5 6)

Similarly, {}, #{}, and () become }{, }#{, and )(, respectively. Backwards barf has exactly the same problem.

laurentpetit commented 8 years ago

@thickey do you feel like you could take a look at it?