From: a bellenir Date: Mon, 4 Jan 2016 20:15:14 +0000 (-0500) Subject: 0 to move to beginning of line X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=869e302713f831ee15e7a3c87cb1a50569053e21;p=projs%2Ftide.git 0 to move to beginning of line --- 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)