nne

No-nonsense editor under 777 SLOC of ANSI C
git clone git://git.luxferre.top/nne.git
Log | Files | Refs | README | LICENSE

commit 5d1008256c149a514e7e2aacf4440d692f3157f0
parent df633e073bf3d22b63be25c4eeb82c37852bb43e
Author: luxferre <lux@ferre>
Date:   Sat, 29 Jul 2023 08:43:08 +0300

Rearranged status bar a bit

Diffstat:
MREADME.md | 2+-
Mnne.c | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md @@ -71,7 +71,7 @@ Invoking `nne` without arguments just creates a new buffer. You can specify a fi ### Status bar -The status bar in nne is the last line of the terminal. Some operations may change its contents, but normally it consists of the following elements: `[state] [filename] [row],[col] [file%] [W]x[H]`, where: +The status bar in nne is the last line of the terminal. Some operations may change its contents, but normally it consists of the following elements: `[state] [row],[col] [file%] [W]x[H] | [filename]`, where: - `[state]` can be `-` (normal/insertion) or `C` (modal command), - `[filename]` refers to the file currently being edited, diff --git a/nne.c b/nne.c @@ -528,10 +528,10 @@ void render() { /* main screen rendering function */ scrbuf_append(nne_msgbuf); nne_status_override = 0; } - else scrbuf_append(nnmsg(0, CURSET "%c %s %u,%u %02u%% %ux%u | %s", nne_termh, 1, - (nne_mode == NNE_CMD) ? 'C' : '-', nne_fname, nne_row, nne_col, + else scrbuf_append(nnmsg(0, CURSET "%c %u,%u %02u%% %ux%u | %s | %s", nne_termh, 1, + (nne_mode == NNE_CMD) ? 'C' : '-', nne_row, nne_col, (100*nne_pos/(nne_real_len <= 2 ? 2 : nne_real_len - 2)), - nne_termw, nne_termh, "Press Esc Esc h to get help")); + nne_termw, nne_termh, nne_fname, "Press Esc Esc h to get help")); scrbuf_append(nnmsg(0, CURSET CURSHOW "\0", nne_scry, nne_scrx)); /* actually draw the screen buffer until the first zero byte */ nnputs(nne_scrbuf);