summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rwxr-xr-xclient.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/client.c b/client.c
index 464568b..2c95468 100755
--- a/client.c
+++ b/client.c
@@ -80,7 +80,7 @@ static struct {
     int8_t dx;
     int8_t dy;
     uint8_t len;
-} insert;
+} insert = { .dx = 1 };
 static char drawChar;
 
 static void insertMode(int8_t dx, int8_t dy) {
@@ -168,7 +168,11 @@ static void readInput(void) {
         case 'r': mode = MODE_REPLACE; break;
         case 'R': mode = MODE_DRAW; drawChar = 0; break;
         case 'x': clientPut(CH_COLOR(inch()), ' '); break;
-        case '~': clientPut(inputColor, inch() & 0x7F); clientMove(1, 0); break;
+
+        case '~':
+            clientPut(inputColor, inch() & 0x7F);
+            clientMove(insert.dx, insert.dy);
+            break;
 
         case '[': if (moveSpeed > 1) moveSpeed--; break;
         case ']': if (moveSpeed < 4) moveSpeed++; break;
-01-08 15:44:32 -0500'>2019-01-08Draw lines to tile edgeJune McEnroe 2019-01-08Factor out default pathsJune McEnroe 2019-01-08Remove incorrect default coordinatesJune McEnroe 2019-01-07Set img src when explore fragment changesJune McEnroe 2019-01-07Compress PNG data in imageJune McEnroe kcgi never enables compression for FastCGI. 2019-01-07madvise MADV_NOCORE in imageJune McEnroe 2019-01-07Add license notice to explore JavaScriptJune McEnroe 2019-01-07Add Q/Home binding in exploreJune McEnroe 2019-01-07Fix explore image URLJune McEnroe 2019-01-07Add HOME button, ssh link, AGPL notice to exploreJune McEnroe 2019-01-06Add meta viewport to exploreJune McEnroe 2019-01-06Set background and max-width in exploreJune McEnroe 2019-01-06Swallow writes after the connection is closedJune McEnroe It was not okay. 2019-01-06Handle KCGI_HUPJune McEnroe I hope it's okay that I keep writing to the fwopen stream after streamWrite returns -1. 2019-01-06Install html filesJune McEnroe