Scroll to reveal target position for code action widget, not current editor position

Fixes #68523
This commit is contained in:
Matt Bierner 2019-02-15 20:13:08 -08:00
parent 9e440ff0c5
commit d6108f6a29

View file

@ -69,7 +69,7 @@ export class CodeActionContextMenu {
this._editor.render();
// Translate to absolute editor position
const cursorCoords = this._editor.getScrolledVisiblePosition(this._editor.getPosition());
const cursorCoords = this._editor.getScrolledVisiblePosition(position);
const editorCoords = getDomNodePagePosition(this._editor.getDomNode());
const x = editorCoords.left + cursorCoords.left;
const y = editorCoords.top + cursorCoords.top + cursorCoords.height;