mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
ESC to exit mirror tag position mode
This commit is contained in:
parent
4e3af8a295
commit
84aa1ada9f
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue