nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 7ffbf016077a81ac9b72fc1438fbf2e3eb557ee5
parent f6b4c243d8c4144b59edb0c572d5eeaf0e3f145e
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 21 Aug 2020 16:06:38 +0200

tweaks: improve three comments and an indentation

Diffstat:
Msrc/winio.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -3281,7 +3281,7 @@ void draw_all_subwindows(void) bottombars(currmenu); } -/* Display details about the current cursor position on the status bar. */ +/* Display on the status bar details about the current cursor position. */ void report_cursor_position(void) { size_t fullwidth = breadth(openfile->current->data) + 1; @@ -3290,23 +3290,23 @@ void report_cursor_position(void) char saved_byte; size_t sum; - /* Determine the size of the file up to the cursor. */ saved_byte = openfile->current->data[openfile->current_x]; openfile->current->data[openfile->current_x] = '\0'; + /* Determine the size of the file up to the cursor. */ sum = number_of_characters_in(openfile->filetop, openfile->current); openfile->current->data[openfile->current_x] = saved_byte; - /* Display the current cursor position on the status bar. */ + /* Calculate the percentages. */ linepct = 100 * openfile->current->lineno / openfile->filebot->lineno; colpct = 100 * column / fullwidth; charpct = (openfile->totsize == 0) ? 0 : 100 * sum / openfile->totsize; statusline(HUSH, - _("line %zd/%zd (%d%%), col %zu/%zu (%d%%), char %zu/%zu (%d%%)"), - openfile->current->lineno, openfile->filebot->lineno, linepct, - column, fullwidth, colpct, sum, openfile->totsize, charpct); + _("line %zd/%zd (%d%%), col %zu/%zu (%d%%), char %zu/%zu (%d%%)"), + openfile->current->lineno, openfile->filebot->lineno, linepct, + column, fullwidth, colpct, sum, openfile->totsize, charpct); } /* Highlight the text between the given two columns on the current line. */