Skip to content

Commit

Permalink
fix #7601
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Jun 30, 2016
1 parent e1df010 commit 13416a3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class Controller extends treedefaults.DefaultController {
protected onLeftClick(tree: tree.ITree, element: any, event: mouse.IMouseEvent): boolean {
let currentFoucssed= tree.getFocus();
if (super.onLeftClick(tree, element, event)) {
if (this.openFileAtElement(element, event.detail !== 2, event.ctrlKey)) {
if (this.openFileAtElement(element, event.detail !== 2, event.ctrlKey, event.detail === 2)) {
return true;
}
if (element instanceof MarkersModel) {
Expand All @@ -41,12 +41,12 @@ export class Controller extends treedefaults.DefaultController {

protected onEnter(tree: tree.ITree, event: keyboard.IKeyboardEvent): boolean {
if (super.onEnter(tree, event)) {
return this.openFileAtElement(tree.getFocus(), false, false);
return this.openFileAtElement(tree.getFocus(), false, false, false);
}
return false;
}

private openFileAtElement(element: any, preserveFocus: boolean, sideByside: boolean) {
private openFileAtElement(element: any, preserveFocus: boolean, sideByside: boolean, pinned: boolean) {
if (element instanceof Marker) {
this.telemetryService.publicLog('problems.marker.opened', {source: element.source});
let marker = <IMarker>element.marker;
Expand All @@ -60,6 +60,7 @@ export class Controller extends treedefaults.DefaultController {
endColumn: marker.endColumn
},
preserveFocus: preserveFocus,
pinned: pinned
},
}, sideByside).done(null, errors.onUnexpectedError);
return true;
Expand Down

0 comments on commit 13416a3

Please sign in to comment.