From eb98d2238c60f3a123d905f409688c8261e7516b Mon Sep 17 00:00:00 2001 From: lmg-anon <139719567+lmg-anon@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:09:34 -0300 Subject: [PATCH] Fix {predict} insertion in insertTemplate --- mikupad.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mikupad.html b/mikupad.html index 89757d6..1f53175 100644 --- a/mikupad.html +++ b/mikupad.html @@ -5443,7 +5443,7 @@ const startPos = elem.selectionStart; const endPos = elem.selectionEnd; const textBefore = elem.value.substring(0, startPos) || ""; - const textAfter = (sysInst !== "sys" && elem.selectionStart !== elem.value.length ? "{predict}" : "") + elem.value.substring(endPos); + const textAfter = (sysInst !== "sys" && elem.selectionEnd !== elem.value.length ? "{predict}" : "") + elem.value.substring(endPos); const selectedText = elem.value.substring(startPos, endPos); const finalText = textBefore