From 6fe92bc7c60de578fc18ef56e999435c4e6aa765 Mon Sep 17 00:00:00 2001 From: mcDandy Date: Thu, 23 Apr 2026 11:25:43 +0200 Subject: [PATCH] AI: checkpoint 4 --- web/script_text_input.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/web/script_text_input.js b/web/script_text_input.js index b90c95a..d2f9f0d 100644 --- a/web/script_text_input.js +++ b/web/script_text_input.js @@ -46,7 +46,11 @@ if (!window.__mrmthScriptInputUnifiedInit) { box-sizing: border-box; overflow: hidden; } - + .mrmth-syntax-layer::after { + content: ""; + display: block; + height: 1em; + } .mrmth-gutter-content { white-space: pre; will-change: transform; @@ -325,15 +329,8 @@ if (!window.__mrmthScriptInputUnifiedInit) { requestAnimationFrame(refresh); } function updateHighlight(textarea, syntaxLayer) { - // trik: přidat mezeru, pokud končí novým řádkem - const source = - textarea.value.endsWith("\n") - ? textarea.value + " " - : textarea.value; + syntaxLayer.innerHTML = renderHighlight(textarea.value); - syntaxLayer.innerHTML = renderHighlight(source); - - // synchronizace scrollu syntaxLayer.scrollTop = textarea.scrollTop; syntaxLayer.scrollLeft = textarea.scrollLeft; }