From 046ae379deed45c7c1ba926755c41e1ab78c9f2c Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 19 Dec 2019 10:41:30 +0100 Subject: [PATCH] simple editor options: no indent guides. --- .../codeEditor/browser/simpleEditorOptions.ts | 3 ++- src/vs/workbench/contrib/debug/browser/repl.ts | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts b/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts index ac40c376e27..b13b0f1aa57 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts @@ -34,7 +34,8 @@ export function getSimpleEditorOptions(): IEditorOptions { acceptSuggestionOnEnter: 'smart', minimap: { enabled: false - } + }, + renderIndentGuides: false }; } diff --git a/src/vs/workbench/contrib/debug/browser/repl.ts b/src/vs/workbench/contrib/debug/browser/repl.ts index c6b56ddcc59..68244da992c 100644 --- a/src/vs/workbench/contrib/debug/browser/repl.ts +++ b/src/vs/workbench/contrib/debug/browser/repl.ts @@ -6,7 +6,6 @@ import 'vs/css!vs/workbench/contrib/debug/browser/media/repl'; import * as nls from 'vs/nls'; import { URI as uri } from 'vs/base/common/uri'; -import * as errors from 'vs/base/common/errors'; import { IAction, IActionViewItem, Action } from 'vs/base/common/actions'; import * as dom from 'vs/base/browser/dom'; import * as aria from 'vs/base/browser/ui/aria/aria'; @@ -401,17 +400,17 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati @memoize private get refreshScheduler(): RunOnceScheduler { - return new RunOnceScheduler(() => { + return new RunOnceScheduler(async () => { if (!this.tree.getInput()) { return; } + const lastElementVisible = this.tree.scrollTop + this.tree.renderHeight >= this.tree.scrollHeight; - this.tree.updateChildren().then(() => { - if (lastElementVisible) { - // Only scroll if we were scrolled all the way down before tree refreshed #10486 - revealLastElement(this.tree); - } - }, errors.onUnexpectedError); + await this.tree.updateChildren(); + if (lastElementVisible) { + // Only scroll if we were scrolled all the way down before tree refreshed #10486 + revealLastElement(this.tree); + } }, Repl.REFRESH_DELAY); } @@ -588,6 +587,7 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati this.replElementsChangeListener.dispose(); } this.refreshScheduler.dispose(); + this.modelChangeListener.dispose(); super.dispose(); } }