output: always auto reveal last line unless channel is locked

fixes #20150
This commit is contained in:
isidor 2017-02-08 13:00:19 +01:00
parent 9a3321404e
commit 2cf9b325cb
2 changed files with 3 additions and 4 deletions

View file

@ -151,12 +151,11 @@ export class TextResourceEditor extends BaseTextEditor {
* Reveals the last line of this editor if it has a model set.
* If smart reveal is true will only reveal the last line if the line before last is visible #3351
*/
public revealLastLine(smartReveal = false): void {
public revealLastLine(): void {
const codeEditor = <ICodeEditor>this.getControl();
const model = codeEditor.getModel();
const lineBeforeLastRevealed = codeEditor.getScrollTop() + codeEditor.getLayoutInfo().height >= codeEditor.getScrollHeight();
if (model && (!smartReveal || lineBeforeLastRevealed)) {
if (model) {
const lastLine = model.getLineCount();
codeEditor.revealLine(lastLine);
}

View file

@ -278,7 +278,7 @@ class OutputContentProvider implements ITextModelContentProvider {
if (!this.channelIdsWithScrollLock.has(channel)) {
// reveal last line
const panel = this.panelService.getActivePanel();
(<OutputPanel>panel).revealLastLine(true);
(<OutputPanel>panel).revealLastLine();
}
}