From 384e2df3f105f4b28bdc1d43126d9d3248868d15 Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Wed, 28 Jan 2026 20:33:38 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Refactor=20scrollToResult=20func?= =?UTF-8?q?tion=20for=20improved=20readability=20and=20formatting=20consis?= =?UTF-8?q?tency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pokedex.online/src/views/GamemasterExplorer.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/websites/pokedex.online/src/views/GamemasterExplorer.vue b/code/websites/pokedex.online/src/views/GamemasterExplorer.vue index 2163fc3..ff251d9 100644 --- a/code/websites/pokedex.online/src/views/GamemasterExplorer.vue +++ b/code/websites/pokedex.online/src/views/GamemasterExplorer.vue @@ -678,9 +678,15 @@ function scrollToResult() { const lineNumber = lineIndex + 1; // Convert to 1-based line number // If result is beyond currently displayed lines, load more lines - if (lineIndex >= displayLines.value.length && lineIndex < fileLines.value.length) { + if ( + lineIndex >= displayLines.value.length && + lineIndex < fileLines.value.length + ) { // Expand displayLines to include the result - const newLinesToDisplay = fileLines.value.slice(0, Math.min(lineIndex + 1000, fileLines.value.length)); + const newLinesToDisplay = fileLines.value.slice( + 0, + Math.min(lineIndex + 1000, fileLines.value.length) + ); displayLines.value = newLinesToDisplay.map((content, index) => ({ lineNumber: index + 1, content,