]> git.mdlowis.com Git - projs/tide.git/commitdiff
0 to move to beginning of line
authora bellenir <a@bellenir.com>
Mon, 4 Jan 2016 20:15:14 +0000 (15:15 -0500)
committera bellenir <a@bellenir.com>
Mon, 4 Jan 2016 20:15:14 +0000 (15:15 -0500)
source/main.c

index 58d025840c760edbf0d082d98f766b3248e5eeb5..4611d01b381c71410826df6615be42affe5e6df7 100644 (file)
@@ -161,6 +161,14 @@ static void cursorRight()
     }
 }
 
+static void cursorLineStart()
+{
+    if(Curr.x != 0){
+        Curr.x = 0;
+        ScreenDirty = true;
+    }
+}
+
 static void input(int ch)
 {
     switch (ch) {
@@ -183,6 +191,9 @@ static void input(int ch)
         case 'l':
             cursorRight();
             break;
+        case '0':
+            cursorLineStart();
+            break;
     }
     /* Cap the column selection at the end of text on the current line */
     if (Loc.line->length <= 1)