提交 b97bad54 编写于 作者: P Peter Kahle

When clicking on a changed submodule in the git window, do nothing.

上级 47234904
......@@ -13,6 +13,7 @@ import { toGitUri, fromGitUri } from './uri';
import { grep } from './util';
import { applyLineChanges, intersectDiffWithRange, toLineRanges, invertLineChange } from './staging';
import * as path from 'path';
import { lstatSync } from 'fs';
import * as os from 'os';
import TelemetryReporter from 'vscode-extension-telemetry';
import * as nls from 'vscode-nls';
......@@ -159,6 +160,9 @@ export class CommandCenter {
}
private async _openResource(resource: Resource, preview?: boolean, preserveFocus?: boolean, preserveSelection?: boolean): Promise<void> {
if (lstatSync(resource.resourceUri.fsPath).isDirectory()) {
return; // it's a submodule.
}
const left = this.getLeftResource(resource);
const right = this.getRightResource(resource);
const title = this.getTitle(resource);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册