提交 2cf9b325 编写于 作者: I isidor

output: always auto reveal last line unless channel is locked

fixes #20150
上级 9a332140
......@@ -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);
}
......
......@@ -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();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册