Skip to content

Commit

Permalink
7589-file-search-preview: removed editor-preview
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Arad <dan.arad@sap.com>
  • Loading branch information
danarad05 committed Nov 11, 2020
1 parent c3b8c1d commit f2a523c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ export class SearchInWorkspaceResultTreeWidget extends TreeWidget {
fileUri = new URI(node.fileUri);
}

const opts: EditorOpenerOptions | undefined = !DiffUris.isDiffUri(fileUri) ? {
let opts: EditorOpenerOptions | undefined = !DiffUris.isDiffUri(fileUri) ? {
selection: {
start: {
line: node.line - 1,
Expand All @@ -852,6 +852,10 @@ export class SearchInWorkspaceResultTreeWidget extends TreeWidget {
mode: 'reveal'
} : undefined;

if (preview) {
opts = Object.assign(opts || {}, { preview });
}

const editorWidget = await this.editorManager.open(fileUri, opts);

if (!DiffUris.isDiffUri(fileUri)) {
Expand Down

0 comments on commit f2a523c

Please sign in to comment.