tShow cursor position statistics in right side of status bar - ve - a minimal text editor (work in progress)
(HTM) git clone git://src.adamsgaard.dk/ve
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 42d4fa8d939f6525a7fb75fbf94e551813dab8f7
(DIR) parent 47a9339b4ca25ac94128be6af5f98881381353ca
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 6 Aug 2019 14:33:41 +0200
Show cursor position statistics in right side of status bar
Diffstat:
M output.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/output.c b/output.c
t@@ -47,8 +47,9 @@ editor_draw_status(struct abuf *ab)
}
right_status_len = snprintf(right_status, sizeof(right_status),
- "%s editor -- version %s",
- PROGNAME, VERSION);
+ "%.0f%% < %d:%d",
+ (float)(E.cursor_y)/(E.num_rows-1)*100,
+ E.cursor_x+1, E.cursor_y+1);
if (left_status_len > E.screen_columns)
left_status_len = E.screen_columns;