forked from waderyan/vscode-gitblame
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feature: Adding setting to ignore whitespace changes (`gitblame.ignoreWhitespace`) (waderyan#1) * Feature: Adding setting to open commit info in online tool (`gitblame.commitUrl`) (waderyan#6) * Enhancement: Status bar message no longer clickable when there is no commit associated with the current line * Enhancement: Adding info about configuration in `README.md` * Bug: Spawn fewer git processes when opening a file (waderyan#3)
- Loading branch information
Showing
10 changed files
with
185 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
out | ||
node_modules | ||
node_modules | ||
.vscode/* | ||
!.vscode/launch.json | ||
!.vscode/settings.json | ||
!.vscode/tasks.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
|
||
import {StatusBarItem} from 'vscode'; | ||
export interface IView { | ||
/** | ||
* Refresh the view. | ||
*/ | ||
refresh(text: string): void; | ||
} | ||
|
||
export class StatusBarView implements IView { | ||
export class StatusBarView { | ||
|
||
private _statusBarItem: StatusBarItem; | ||
|
||
constructor(statusBarItem: StatusBarItem) { | ||
this._statusBarItem = statusBarItem; | ||
this._statusBarItem.command = "extension.blame"; | ||
} | ||
|
||
refresh(text: string) { | ||
refresh(text: string, hasCommand: boolean = true) { | ||
this._statusBarItem.text = '$(git-commit) ' + text; | ||
this._statusBarItem.tooltip = 'git blame'; | ||
this._statusBarItem.tooltip = hasCommand ? 'git blame' : 'git blame - No info about current line'; | ||
this._statusBarItem.command = hasCommand ? "extension.blame" : undefined; | ||
this._statusBarItem.show(); | ||
} | ||
} |
Oops, something went wrong.