Skip to content

Commit

Permalink
Merge branch 'diff-panel-output'
Browse files Browse the repository at this point in the history
Conflicts:
	git.py
  • Loading branch information
sheldon committed Jan 23, 2012
2 parents 31bfa38 + 260465c commit 510e09f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Git.sublime-settings
Expand Up @@ -5,4 +5,7 @@
// if present, use this command instead of plain "git"
// e.g. "/Users/kemayo/bin/git" or "C:\bin\git.exe"
,"git_command": false

// use the panel for diff output, rather than a new scratch window (new tab)
,"diff_panel": false
}
6 changes: 5 additions & 1 deletion git.py
Expand Up @@ -365,7 +365,11 @@ def diff_done(self, result):
if not result.strip():
self.panel("No output")
return
view = self.scratch(result, title="Git Diff")
s = sublime.load_settings("Git.sublime-settings")
if s.get('diff_panel'):
view = self.panel(result)
else:
view = self.scratch(result, title="Git Diff")
lines_inserted = view.find_all(r'^\+[^+]{2} ')
lines_deleted = view.find_all(r'^-[^-]{2} ')

Expand Down

0 comments on commit 510e09f

Please sign in to comment.