Skip to content

Commit

Permalink
Don’t abort when user cancels “Documentation for Property”
Browse files Browse the repository at this point in the history
Using abort will show an error dialog in TextMate 2.

Closes textmate/textmate#900.
  • Loading branch information
sorbits committed Mar 19, 2013
1 parent 4a5fbcd commit 2a1f6f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Commands/Documentation for Property.plist
Expand Up @@ -137,6 +137,8 @@ $props = {
"z-index" => "visuren.html#propdef-z-index",
}
require "#{ENV['TM_SUPPORT_PATH']}/lib/exit_codes.rb"
cur_line = ENV['TM_CURRENT_LINE']
cur_word = ENV['TM_CURRENT_WORD']
Expand All @@ -147,7 +149,7 @@ def request_prop_name
s = `\"#{ENV['TM_SUPPORT_PATH']}/bin/CocoaDialog.app/Contents/MacOS/CocoaDialog\" inputbox --float --title 'Documentation for Property' --informative-text 'What property would you like to lookup?' --text '#{$prop_name}' --button1 'Lookup' --button2 'Cancel' --button3 'Show All Properties'`
case (a = s.split("\n"))[0].to_i
when 1 then $props[a[1].to_s] || "propidx.html"
when 2 then abort "<script>window.close()</script>"
when 2 then TextMate.exit_discard
when 3 then "propidx.html"
end
end
Expand Down

0 comments on commit 2a1f6f8

Please sign in to comment.