be

based editor
git clone git://git.kocotian.pl/be.git
Log | Files | Refs | README | LICENSE

commit dda0091eb1d7e8302c972c49200d5c76744a8680
parent 332515a727894d06961de4911979abc8f89263cf
Author: kocotian <kocotian@kocotian.pl>
Date:   Sun, 18 Apr 2021 17:10:26 +0200

Cursor changes in edit mode

Diffstat:
Mbe.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/be.c b/be.c @@ -181,14 +181,15 @@ static void termRefresh(void) { String ab = { NULL, 0 }; - char cp[19]; + char cp[24]; abAppend(&ab, "\033[?25l\033[H", 9); appendRows(&ab); appendContents(&ab); appendStatus(&ab); - abPrintf(&ab, cp, 19, "\033[%4d;%4ldH\033[?25h", - FOCUSPOINT, CURBUF(editor).x + 1); + abPrintf(&ab, cp, 24, "\033[%4d;%4ldH\033[?25h\033[%c q", + FOCUSPOINT, CURBUF(editor).x + 1, + CURBUF(editor).mode == ModeEdit ? '5' : '1'); if ((unsigned)write(STDOUT_FILENO, ab.data, ab.len) != ab.len) die("write:");