Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dvd101x committed Jan 9, 2025
2 parents c625dc0 + 0dcd1c3 commit 3a41f81
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,7 @@ function updateSelection() {
const thisNode = code;
const fromLine = parseInt(thisNode.getAttribute('data-from-line'), 10);
const toLine = parseInt(thisNode.getAttribute('data-to-line'), 10);
if (
(fromLine >= selectedFrom) && (fromLine <= selectedTo)
||
(toLine >= selectedFrom) && (toLine <= selectedTo)
) {
if ((fromLine <= selectedTo) && (toLine >= selectedFrom)) {
code.classList.add('highlight');
code.scrollIntoView({ block: 'nearest', inline: 'start' });
} else {
Expand Down

0 comments on commit 3a41f81

Please sign in to comment.