提交 9dc7a524 编写于 作者: I isidor

git: bring back smart enablement for stage action

上级 ac63c6b7
......@@ -272,9 +272,15 @@ export class StageRangesAction extends baseeditor.EditorInputAction {
if (!this.gitService || !this.editorService) {
return false;
}
const selection = this.editor.getSelection();
return selection && !selection.isEmpty();
var changes = this.editor.getLineChanges();
var selections = this.editor.getSelections();
if (!changes || !selections || selections.length === 0) {
return false;
}
return stageranges.getSelectedChanges(changes, selections).length > 0;
}
public run():TPromise<any> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册