TextMate toggle comment macro is broken

前端 未结 4 1289
误落风尘
误落风尘 2021-01-02 14:29

My laptop crashed and when it rebooted, \"cmd /\" (toggle comment) was broken. When I try to toggle comments on a line that only contains \"foo\", I get this output in my c

4条回答
  •  别那么骄傲
    2021-01-02 15:01

    Matt Hayes' answer pointed me to the trouble spot.

    Bundles -> Bundle Editor -> Edit Commands --> Source --> Comment Line / Selection

    change line 139:

    - lines = text.to_a
    + lines = text.split(/$/).map(&:chomp)
    

    #to_a is no longer a string method.

    http://ruby-doc.org/core-1.9.3/String.html

提交回复
热议问题