Editor: reveal* family of methods take a ScrollType which can be Smooth or Immediate

This commit is contained in:
Alex Dima
2017-08-30 15:43:28 +02:00
parent 482c3404dd
commit e070afceab
42 changed files with 265 additions and 208 deletions

View File

@@ -250,16 +250,16 @@ export class MainThreadTextEditor {
}
switch (revealType) {
case TextEditorRevealType.Default:
this._codeEditor.revealRange(range);
this._codeEditor.revealRange(range, EditorCommon.ScrollType.Smooth);
break;
case TextEditorRevealType.InCenter:
this._codeEditor.revealRangeInCenter(range);
this._codeEditor.revealRangeInCenter(range, EditorCommon.ScrollType.Smooth);
break;
case TextEditorRevealType.InCenterIfOutsideViewport:
this._codeEditor.revealRangeInCenterIfOutsideViewport(range);
this._codeEditor.revealRangeInCenterIfOutsideViewport(range, EditorCommon.ScrollType.Smooth);
break;
case TextEditorRevealType.AtTop:
this._codeEditor.revealRangeAtTop(range);
this._codeEditor.revealRangeAtTop(range, EditorCommon.ScrollType.Smooth);
break;
default:
console.warn(`Unknown revealType: ${revealType}`);