From 897cc235813414ef3b58634cd82c93626e8a4783 Mon Sep 17 00:00:00 2001 From: Martin Hedenfalk Date: Tue, 5 Jul 2011 17:18:11 +0200 Subject: [PATCH] implicit global objects are replaced with global accessor functions --- Support/lib/rails/text_mate.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Support/lib/rails/text_mate.rb b/Support/lib/rails/text_mate.rb index 6a2199f..31c484d 100644 --- a/Support/lib/rails/text_mate.rb +++ b/Support/lib/rails/text_mate.rb @@ -15,7 +15,7 @@ def open_url(url) `open "#{url}"` end - # Open a file in textmate using the txmt:// protocol. Uses 0-based line and column indices. + # Open a file in Vico using vicotool. Uses 0-based line and column indices. def open(filename, line_number = nil, column_number = nil) filename = filename.filepath if filename.is_a? RailsPath #options = [] @@ -23,7 +23,7 @@ def open(filename, line_number = nil, column_number = nil) #options << "line=#{line_number + 1}" if line_number #options << "column=#{column_number + 1}" if column_number #open_url "txmt://open?" + options.join("&") - `#{VICO} -e '(window gotoURL:(NSURL fileURLWithPath:"#{filename}") line:#{line_number.to_i} column:#{column_number.to_i})'` + `#{VICO} -e '((current-window) gotoURL:(NSURL fileURLWithPath:"#{filename}") line:#{line_number.to_i + 1} column:#{column_number.to_i})'` end # Always return something, or nil, for selected_text