Permalink
Browse files

Fixed Reformat Comment to use a default value of 80 when there is no …

…TM_COLUMNS environment variable
  • Loading branch information...
1 parent f1d1b2d commit 71a9e461c8e367399209e5a82d87920615464ad5 @DGrady DGrady committed with infininight Jan 18, 2012
Showing with 11 additions and 3 deletions.
  1. +11 −3 Commands/Reformat Comment.tmCommand
@@ -20,7 +20,7 @@ end
flags = %Q{-p "#{cstring}"}
flags += " --retabify" unless ENV["TM_SOFT_TABS"] == "YES"
-flags += " -c #{ENV['TM_COLUMNS']}"
+flags += " -c #{ENV['TM_COLUMNS'].nil? ? 80 : ENV['TM_COLUMNS']}"
command = "ruby #{e_sh(ENV["TM_BUNDLE_SUPPORT"])}/bin/rubywrap.rb #{flags}"
text = open("| #{command}", "r+") do |wrapper|
@@ -35,15 +35,23 @@ print e_sn(text)
<string>scope</string>
<key>input</key>
<string>selection</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^q</string>
<key>name</key>
<string>Reformat Comment</string>
- <key>output</key>
- <string>insertAsSnippet</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>snippet</string>
+ <key>outputLocation</key>
+ <string>replaceInput</string>
<key>scope</key>
<string>comment.line</string>
<key>uuid</key>
<string>F20AD964-3C68-4940-91B1-8A99B8E2A375</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>

0 comments on commit 71a9e46

Please sign in to comment.