Skip to content

Commit

Permalink
Fix {predict} insertion in insertTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
lmg-anon authored Dec 3, 2024
1 parent 3c342eb commit eb98d22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mikupad.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eb98d22

Please sign in to comment.