From: Wilmer Ricciotti Date: Thu, 14 Jul 2011 15:11:15 +0000 (+0000) Subject: Changes to TeX-macro conversion. X-Git-Tag: make_still_working~2370 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=bc16ecd300cad503ab303d92e643954867c9ab85 Changes to TeX-macro conversion. --- 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 {