diff --git a/src/views/CodemirrorEditor.vue b/src/views/CodemirrorEditor.vue index 6bcdb63..3f4038b 100644 --- a/src/views/CodemirrorEditor.vue +++ b/src/views/CodemirrorEditor.vue @@ -465,12 +465,14 @@ export default { start = anchor end = head } - } else if (head.line < anchor.line) { - start = head - end = anchor } else { - start = head - end = anchor + if (head.line < anchor.line) { + start = head + end = anchor + } else { + start = anchor + end = head + } } const rows = []