]> matita.cs.unibo.it Git - helm.git/commitdiff
Changes to TeX-macro conversion.
authorWilmer Ricciotti <ricciott@cs.unibo.it>
Thu, 14 Jul 2011 15:11:15 +0000 (15:11 +0000)
committerWilmer Ricciotti <ricciott@cs.unibo.it>
Thu, 14 Jul 2011 15:11:15 +0000 (15:11 +0000)
matitaB/matita/matitaweb.js

index 3400c87e6e944e8e1d71ad6371d508ad7b38bfdd..e4b0efdba98cc4f72e3d9b22c8fca2519fc8a398 100644 (file)
@@ -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 {