]> matita.cs.unibo.it Git - helm.git/commitdiff
more keyboard events tests.
authorWilmer Ricciotti <ricciott@cs.unibo.it>
Wed, 13 Jul 2011 15:02:53 +0000 (15:02 +0000)
committerWilmer Ricciotti <ricciott@cs.unibo.it>
Wed, 13 Jul 2011 15:02:53 +0000 (15:02 +0000)
matitaB/matita/matitaweb.js

index 1088f51ce9047d3be85394ef4e565a7b8d653dc7..1bebb6d3028fb97f09459bbdaeb6b8c4859bd7cc 100644 (file)
@@ -118,8 +118,8 @@ function keypress(e)
        i = unlocked.innerHTML.lastIndexOf('\\',j);
                if (i >= 0) {
          match = unlocked.innerHTML.substring(i,j);
-         pre = unlocked.innerHTML.substring(0,i-1);
-         post = unlocked.innerHTML.substring(j+1);
+         pre = unlocked.innerHTML.substring(0,i);
+         post = unlocked.innerHTML.substring(j);
          if (match == '\\to') {
              unlocked.innerHTML = pre + "-> " + post;
             return suppressdefault(e,true);