Exit mirror cursor mode when there's a none-empty selection in an unmmatched state

This commit is contained in:
Mohammad Rahhal
2019-12-14 16:26:47 +02:00
parent 2d3c754f71
commit e01bc49c57

View File

@@ -128,6 +128,16 @@ export function activateMirrorCursor(
workspace.applyEdit(cleanupEdit);
}
}
} else {
const charBeforeAndAfterPositionsRoughlyEqual = isCharBeforeAndAfterPositionsRoughlyEqual(
event.textEditor.document,
event.selections[0].active,
event.selections[1].active
);
if (!charBeforeAndAfterPositionsRoughlyEqual) {
exitMirrorMode();
}
}
}
}