提交 7e6aca12 编写于 作者: S Sandeep Somavarapu

#40575 Do not auto reveal last line in log viewer

上级 8c436e64
...@@ -30,7 +30,6 @@ import { Position } from 'vs/editor/common/core/position'; ...@@ -30,7 +30,6 @@ import { Position } from 'vs/editor/common/core/position';
import { IFileService, FileChangeType } from 'vs/platform/files/common/files'; import { IFileService, FileChangeType } from 'vs/platform/files/common/files';
import { IPanel } from 'vs/workbench/common/panel'; import { IPanel } from 'vs/workbench/common/panel';
import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { RotatingLogger } from 'spdlog'; import { RotatingLogger } from 'spdlog';
import { toLocalISOString } from 'vs/base/common/date'; import { toLocalISOString } from 'vs/base/common/date';
...@@ -39,7 +38,6 @@ import { ILogService } from 'vs/platform/log/common/log'; ...@@ -39,7 +38,6 @@ import { ILogService } from 'vs/platform/log/common/log';
import { binarySearch } from 'vs/base/common/arrays'; import { binarySearch } from 'vs/base/common/arrays';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IMessageService, Severity } from 'vs/platform/message/common/message';
import { LogViewer } from 'vs/workbench/parts/output/browser/logViewer';
import { Schemas } from 'vs/base/common/network'; import { Schemas } from 'vs/base/common/network';
import { ICommandService } from 'vs/platform/commands/common/commands'; import { ICommandService } from 'vs/platform/commands/common/commands';
...@@ -376,7 +374,6 @@ export class OutputService extends Disposable implements IOutputService, ITextMo ...@@ -376,7 +374,6 @@ export class OutputService extends Disposable implements IOutputService, ITextMo
@IPanelService private panelService: IPanelService, @IPanelService private panelService: IPanelService,
@IWorkspaceContextService contextService: IWorkspaceContextService, @IWorkspaceContextService contextService: IWorkspaceContextService,
@ITextModelService textModelResolverService: ITextModelService, @ITextModelService textModelResolverService: ITextModelService,
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
@IEnvironmentService environmentService: IEnvironmentService, @IEnvironmentService environmentService: IEnvironmentService,
@IWindowService windowService: IWindowService, @IWindowService windowService: IWindowService,
@ITelemetryService private telemetryService: ITelemetryService, @ITelemetryService private telemetryService: ITelemetryService,
...@@ -533,8 +530,7 @@ export class LogContentProvider { ...@@ -533,8 +530,7 @@ export class LogContentProvider {
private channels: Map<string, OutputChannel> = new Map<string, OutputChannel>(); private channels: Map<string, OutputChannel> = new Map<string, OutputChannel>();
constructor( constructor(
@IInstantiationService private instantiationService: IInstantiationService, @IInstantiationService private instantiationService: IInstantiationService
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
) { ) {
} }
...@@ -554,13 +550,6 @@ export class LogContentProvider { ...@@ -554,13 +550,6 @@ export class LogContentProvider {
if (!channel) { if (!channel) {
const channelDisposables = []; const channelDisposables = [];
channel = this.instantiationService.createInstance(FileOutputChannel, { id, label: '', file: resource.with({ scheme: Schemas.file }) }, resource); channel = this.instantiationService.createInstance(FileOutputChannel, { id, label: '', file: resource.with({ scheme: Schemas.file }) }, resource);
channel.onDidAppendedContent(() => {
for (const editor of this.editorService.getVisibleEditors()) {
if (editor instanceof LogViewer && editor.input && channel.file.toString() === editor.input.getResource().toString()) {
editor.revealLastLine();
}
}
}, channelDisposables);
channel.onDispose(() => dispose(channelDisposables), channelDisposables); channel.onDispose(() => dispose(channelDisposables), channelDisposables);
this.channels.set(id, channel); this.channels.set(id, channel);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册