ESC to exit mirror tag position mode

This commit is contained in:
Pine Wu 2019-11-22 13:59:26 -08:00
parent 4e3af8a295
commit 84aa1ada9f

View file

@ -45,7 +45,7 @@ export function activateMatchingTagPosition(
isEnabled = true;
}
// let prevCursorCount = 0;
let prevCursorCount = 0;
let cursorCount = 0;
let inMirrorMode = false;
@ -54,10 +54,13 @@ export function activateMatchingTagPosition(
return;
}
// prevCursorCount = cursorCount;
prevCursorCount = cursorCount;
cursorCount = event.selections.length;
if (cursorCount === 1) {
if (inMirrorMode && prevCursorCount === 2) {
return;
}
if (event.selections[0].isEmpty) {
matchingTagPositionProvider(event.textEditor.document, event.selections[0].active).then(position => {
if (position && window.activeTextEditor) {