diff --git a/src/winio.c b/src/winio.c index 5f5cad82..c954140a 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2109,13 +2109,9 @@ void minibar(void) char *thename = NULL, *number_of_lines = NULL, *ranking = NULL; char *location = nmalloc(44); char *hexadecimal = nmalloc(9); - char *successor = NULL; size_t namewidth, placewidth; size_t tallywidth = 0; size_t padding = 2; -#ifdef ENABLE_UTF8 - wchar_t widecode; -#endif /* Draw a colored bar over the full width of the screen. */ wattron(bottomwin, interface_color_pair[MINI_INFOBAR]); @@ -2127,7 +2123,7 @@ void minibar(void) } else thename = copy_of(_("(nameless)")); - sprintf(location, "%zi,%zi", openfile->current->lineno, xplustabs() + 1); + sprintf(location, "%zi %zi", openfile->current->lineno, xplustabs() + 1); placewidth = strlen(location); namewidth = breadth(thename); @@ -2172,63 +2168,8 @@ void minibar(void) #endif /* Display the line/column position of the cursor. */ - if (ISSET(CONSTANT_SHOW) && namewidth + tallywidth + placewidth + 32 < COLS) - mvwaddstr(bottomwin, 0, COLS - 27 - placewidth, location); - - /* Display the hexadecimal code of the character under the cursor, - * plus the codes of up to two succeeding zero-width characters. */ - if (ISSET(CONSTANT_SHOW) && namewidth + tallywidth + 28 < COLS) { - char *this_position = openfile->current->data + openfile->current_x; - - if (*this_position == '\0') - sprintf(hexadecimal, openfile->current->next ? -#ifdef ENABLE_UTF8 - using_utf8() ? "U+000A" : -#endif - " 0x0A" : " ----"); - else if (*this_position == '\n') - sprintf(hexadecimal, " 0x00"); -#ifdef ENABLE_UTF8 - else if ((unsigned char)*this_position < 0x80 && using_utf8()) - sprintf(hexadecimal, "U+%04X", (unsigned char)*this_position); - else if (using_utf8() && mbtowide(&widecode, this_position) > 0) - sprintf(hexadecimal, "U+%04X", (int)widecode); -#endif - else - sprintf(hexadecimal, " 0x%02X", (unsigned char)*this_position); - - mvwaddstr(bottomwin, 0, COLS - 23, hexadecimal); - -#ifdef ENABLE_UTF8 - successor = this_position + char_length(this_position); - - if (*this_position && *successor && is_zerowidth(successor) && - mbtowide(&widecode, successor) > 0) { - sprintf(hexadecimal, "|%04X", (int)widecode); - waddstr(bottomwin, hexadecimal); - - successor += char_length(successor); - - if (is_zerowidth(successor) && mbtowide(&widecode, successor) > 0) { - sprintf(hexadecimal, "|%04X", (int)widecode); - waddstr(bottomwin, hexadecimal); - } - } else - successor = NULL; -#endif - } - - /* Display the state of three flags, and the state of macro and mark. */ - if (ISSET(STATEFLAGS) && !successor && namewidth + tallywidth + 14 + 2 * padding < COLS) { - wmove(bottomwin, 0, COLS - 11 - padding); - show_states_at(bottomwin); - } - - /* Display how many percent the current line is into the file. */ - if (namewidth + 6 < COLS) { - sprintf(location, "%3zi%%", 100 * openfile->current->lineno / openfile->filebot->lineno); - mvwaddstr(bottomwin, 0, COLS - 4 - padding, location); - } + if (namewidth + tallywidth + placewidth + 7 < COLS) + mvwaddstr(bottomwin, 0, COLS - 2 - placewidth, location); wattroff(bottomwin, interface_color_pair[MINI_INFOBAR]); wrefresh(bottomwin);