Permalink
Browse files

Don’t refocus TextMate after executing a command

This was necessary to make TextMate 1.x rescan project folder for changed files, but 2.0 should automatically pick up changes done to the file system.
  • Loading branch information...
1 parent df7c6ae commit 1188d834feadf40a40ef8de4b6076adffc78dca7 @sorbits sorbits committed Jan 8, 2013
@@ -22,7 +22,6 @@ if 'Revert' == TextMate::UI.alert(:warning, "Revert #{files}?", "Do you really w
puts git.revert(paths)
- git.rescan_project
end
</string>
<key>input</key>
@@ -80,7 +80,6 @@ def merge
@result = git.merge(@merge_from_branch)
render "merge"
end
- rescan_project
true
end
@@ -164,7 +163,6 @@ def switch_local(target_branch)
else
puts htmlize(output)
output_show_html
- rescan_project
end
end
end
@@ -153,7 +153,6 @@ def run_pull(remote_name, remote_branch_name)
:progress => lambda { |state, percentage, index, count| progress(remote_name, state, percentage, index, count)},
:end => lambda { |state, count| progress_end(remote_name, state, count) }
)
- rescan_project
pulls
end
@@ -60,8 +60,6 @@ def pop
puts "<h2>Diff of stash applied:</h2>"
render("/diff/_diff_results", :locals => {:diff_results => stash_diff})
-
- rescan_project
end
def save
@@ -87,7 +85,6 @@ def save
end
puts result
- rescan_project
end
def clear
@@ -27,7 +27,6 @@ def add
puts <<-EOF
<p>Done.</p>
EOF
- rescan_project
end
def update
@@ -7,7 +7,6 @@ def dcommit
def rebase
puts "<h2>Rebasing Subversion Repository</h2>"
puts htmlize(git.svn.rebase)
- rescan_project
end
def fetch
@@ -36,7 +36,6 @@ def create(name, options = {})
def switch(name)
result = base.command("checkout", name)
- rescan_project
result
end
@@ -80,14 +80,6 @@ def tm_open(file, options = {})
end
-def rescan_project
- %x{osascript &>/dev/null \
- -e 'tell app "SystemUIServer" to activate' \
- -e 'tell app "#{File.basename(ENV['TM_APP_PATH'], '.app')}" to activate' &
- }
-end
-
-
# this method only applies when the whole document contents are sent in
def tm_expanded_selection(options = {})
text=ENV['TM_SELECTED_TEXT'].to_s

0 comments on commit 1188d83

Please sign in to comment.