From 869e302713f831ee15e7a3c87cb1a50569053e21 Mon Sep 17 00:00:00 2001 From: a bellenir Date: Mon, 4 Jan 2016 15:15:14 -0500 Subject: [PATCH] 0 to move to beginning of line --- source/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/main.c b/source/main.c index 58d0258..4611d01 100644 --- a/source/main.c +++ b/source/main.c @@ -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) -- 2.54.0