tweaks: adjust the indentation after the previous change
Also, reduce the scope of a variable, and rehuffle two lines.master
parent
7b48458380
commit
bad591d43d
|
@ -2069,10 +2069,9 @@ void titlebar(const char *path)
|
|||
/* Draw a bar at the bottom with some minimal state information. */
|
||||
void minibar(void)
|
||||
{
|
||||
char *thisline = openfile->current->data;
|
||||
char *hexadecimal = nmalloc(9);
|
||||
char *location = nmalloc(44);
|
||||
char *thename = NULL, *number_of_lines = NULL, *ranking = NULL;
|
||||
char *location = nmalloc(44);
|
||||
char *hexadecimal = nmalloc(9);
|
||||
size_t namewidth, placewidth;
|
||||
size_t padding = 2;
|
||||
wchar_t widecode;
|
||||
|
@ -2131,6 +2130,8 @@ void minibar(void)
|
|||
|
||||
/* Display the hexadecimal code of the character under the cursor. */
|
||||
if (namewidth < COLS - 27 && COLS > 29) {
|
||||
char *thisline = openfile->current->data;
|
||||
|
||||
if (thisline[openfile->current_x] == '\0')
|
||||
sprintf(hexadecimal, openfile->current->next ? "U+000A" : "------");
|
||||
else if (thisline[openfile->current_x] == '\n')
|
||||
|
@ -2140,6 +2141,7 @@ void minibar(void)
|
|||
sprintf(hexadecimal, "U+%04X", widecode);
|
||||
else
|
||||
sprintf(hexadecimal, "U+%04X", (unsigned char)thisline[openfile->current_x]);
|
||||
|
||||
mvwaddstr(bottomwin, 0, COLS - 23, hexadecimal);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue