diff --git a/extensions/emmet/src/editPoint.ts b/extensions/emmet/src/editPoint.ts index e7f468f29c704159395993a8f2b81de4ee6259ae..5338c5012e14699b5630d6dde160754fab22d80b 100644 --- a/extensions/emmet/src/editPoint.ts +++ b/extensions/emmet/src/editPoint.ts @@ -15,9 +15,10 @@ export function fetchEditPoint(direction: string): void { let newSelections: vscode.Selection[] = []; editor.selections.forEach(selection => { let updatedSelection = direction === 'next' ? nextEditPoint(selection.anchor, editor) : prevEditPoint(selection.anchor, editor); - newSelections.push(updatedSelection); + newSelections.push(updatedSelection ? updatedSelection : selection); }); editor.selections = newSelections; + editor.revealRange(editor.selections[editor.selections.length - 1]); } function nextEditPoint(position: vscode.Position, editor: vscode.TextEditor): vscode.Selection { diff --git a/extensions/emmet/src/selectItem.ts b/extensions/emmet/src/selectItem.ts index b479c0ca74c19cedc027c150a313f7c478ea2096..5ef47062ede0e8e9c32bba1c508621fb683867e9 100644 --- a/extensions/emmet/src/selectItem.ts +++ b/extensions/emmet/src/selectItem.ts @@ -38,4 +38,5 @@ export function fetchSelectItem(direction: string): void { newSelections.push(updatedSelection ? updatedSelection : selection); }); editor.selections = newSelections; + editor.revealRange(editor.selections[editor.selections.length - 1]); } \ No newline at end of file