~luxferre/nne

5d1008256c149a514e7e2aacf4440d692f3157f0 — luxferre 1 year, 1 month ago df633e0
Rearranged status bar a bit
2 files changed, 4 insertions(+), 4 deletions(-)

M README.md
M nne.c
M README.md => README.md +1 -1
@@ 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,

M nne.c => nne.c +3 -3
@@ 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);