changeset 54:de01aafd4dd6

termemu.js: don't warn on certain control sequences. Don't print a debug message for some control sequences that technically are unimplemented, but would just put the terminal into the only mode yet implemented. CSI 4l and CSI ?7h are like this.
author John "Elwin" Edwards <elwin@sdf.org>
date Fri, 15 Jun 2012 16:23:57 -0700
parents e93751ff7815
children 96815eae4ebe
files termemu.js
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/termemu.js	Mon Jun 11 14:11:27 2012 -0700
+++ b/termemu.js	Fri Jun 15 16:23:57 2012 -0700
@@ -1004,6 +1004,10 @@
         if (params[i] == 1) {
           keyHexCodes.appCursor(true);
         }
+        else if (params[i] == 7) {
+          /* Wraparound ON is the only mode implemented. */
+          debug(0, "Wraparound mode");
+        }
         else if (params[i] == 1048) {
           this.saveCursor();
         }
@@ -1018,8 +1022,14 @@
     else if (c == 108) {
       /* l - reset modes */
       if (prefix != '?') {
-        debug(1, "Unimplemented CSI sequence: " + comstr);
-        return;
+        if (prefix === null && params[0] == 4) {
+          /* Insert mode is not implemented. */
+          debug(0, "Replace mode");
+        }
+        else {
+          debug(1, "Unimplemented CSI sequence: " + comstr);
+          return;
+        }
       }
       for (var i = 0; i < params.length; i++) {
         if (params[i] == 1) {