tChange status styling and make sure location percentage is positive - ve - a m… | |
git clone git://src.adamsgaard.dk/ve | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 6652c9e2828ed13a56d577d091a2bb2ba174da83 | |
parent da50d333219b36039f8cde3175865d3db0212f05 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 6 Aug 2019 14:43:42 +0200 | |
Change status styling and make sure location percentage is positive | |
Diffstat: | |
M output.c | 8 ++++---- | |
1 file changed, 4 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/output.c b/output.c | |
t@@ -38,11 +38,11 @@ editor_draw_status(struct abuf *ab) | |
switch (E.mode) { | |
case 1: | |
left_status_len = snprintf(left_status, sizeof(left_st… | |
- "INSERT "); | |
+ "INSERT > "); | |
break; | |
case 2: | |
left_status_len = snprintf(left_status, sizeof(left_st… | |
- "VISUAL "); | |
+ "VISUAL > "); | |
break; | |
} | |
left_status_len += snprintf(left_status + left_status_len, | |
t@@ -50,8 +50,8 @@ editor_draw_status(struct abuf *ab) | |
E.filename ? E.filename : "[unnamed] "); | |
right_status_len = snprintf(right_status, sizeof(right_status), | |
- "%.0f%% < %d:%d", | |
- (float)(E.cursor_y)/(E.num_rows-1)*100, | |
+ "%d%% < %d:%d", | |
+ abs((int)((float)(E.cursor_y)/(E.num_rows-… | |
E.cursor_x+1, E.cursor_y+1); | |
if (left_status_len > E.screen_columns) |