From: Mike Lowis Date: Wed, 5 Oct 2016 13:10:10 +0000 (-0400) Subject: Fixed horizontal cursor movement and init insert mode to false X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=de32a0cd8473040e9464672579c6ff23bc78ad0d;p=projs%2Ftide.git Fixed horizontal cursor movement and init insert mode to false --- diff --git a/buf.c b/buf.c index 67ea391..cbe4751 100644 --- a/buf.c +++ b/buf.c @@ -13,6 +13,7 @@ void buf_load(Buf* buf, char* path) void buf_initsz(Buf* buf, size_t sz) { + buf->insert_mode = false; buf->bufsize = sz; buf->bufstart = (Rune*)malloc(buf->bufsize * sizeof(Rune)); buf->bufend = buf->bufstart + buf->bufsize; diff --git a/screen.c b/screen.c index 9035ac6..ed8c63c 100644 --- a/screen.c +++ b/screen.c @@ -151,6 +151,8 @@ void screen_update(Buf* buf, unsigned csr, unsigned* csrx, unsigned* csry) { } if (buf_get(buf,pos++) == '\t') x += (TabWidth - (x % TabWidth)); + else + x += 1; } break; }