From bc16ecd300cad503ab303d92e643954867c9ab85 Mon Sep 17 00:00:00 2001 From: Wilmer Ricciotti Date: Thu, 14 Jul 2011 15:11:15 +0000 Subject: [PATCH] Changes to TeX-macro conversion. --- matitaB/matita/matitaweb.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/matitaB/matita/matitaweb.js b/matitaB/matita/matitaweb.js index 3400c87e6..e4b0efdba 100644 --- a/matitaB/matita/matitaweb.js +++ b/matitaB/matita/matitaweb.js @@ -155,8 +155,10 @@ function keypress(e) sym = lookup_tex(match); if (typeof sym != "undefined") { - unlocked.innerHTML = pre + sym + " " + post; - restoreSelection(sym.length - match.length); + len1 = unlocked.innerText.length; + unlocked.innerHTML = pre + sym + post; + len2 = unlocked.innerText.length; + restoreSelection(len2 - len1); return suppressdefault(e,true); } else { -- 2.39.2