Sfoglia il codice sorgente

close #34 added 0x7f as backspace and removed wrong check for 0x7e as delete. close #34

prozessorkern 4 anni fa
parent
commit
4f7fbff2e8
1 ha cambiato i file con 2 aggiunte e 7 eliminazioni
  1. 2 7
      src/shellmatta.c

+ 2 - 7
src/shellmatta.c

@@ -476,17 +476,12 @@ shellmatta_retCode_t shellmatta_processData(shellmatta_handle_t     handle,
                 utils_terminateInput(inst);
             }
             /** -# check for backspace */
-            else if('\b' == *data)
+            else if(    ('\b'   == *data)
+                    ||  ('\x7f' == *data))
             {
                 inst->dirty = true;
                 utils_removeChars(inst, 1u, true);
             }
-            /** -# check for delete key */
-            else if(0x7eu == *data)
-            {
-                inst->dirty = true;
-                utils_removeChars(inst, 1u, false);
-            }
             /** -# check for start of escape sequence */
             else if('\x1b' == *data)
             {