mirror of
https://github.com/dvorka/hstr.git
synced 2025-01-02 05:02:41 +08:00
Merge pull request #261 from xaizek/fix-selected-row-hilight
Fixed padding of currently selected item.
This commit is contained in:
commit
ce8ca63074
1 changed files with 3 additions and 5 deletions
|
@ -132,8 +132,6 @@
|
||||||
#define HH_CASE_INSENSITIVE 0
|
#define HH_CASE_INSENSITIVE 0
|
||||||
#define HH_CASE_SENSITIVE 1
|
#define HH_CASE_SENSITIVE 1
|
||||||
|
|
||||||
#define SPACE_PADDING " "
|
|
||||||
|
|
||||||
#ifdef DEBUG_KEYS
|
#ifdef DEBUG_KEYS
|
||||||
#define LOGKEYS(Y,KEY) mvprintw(Y, 0, "Key: '%3d' / Char: '%c'", KEY, KEY); clrtoeol()
|
#define LOGKEYS(Y,KEY) mvprintw(Y, 0, "Key: '%3d' / Char: '%c'", KEY, KEY); clrtoeol()
|
||||||
#else
|
#else
|
||||||
|
@ -827,9 +825,9 @@ void hstr_print_highlighted_selection_row(char *text, int y, int width, Hstr *hs
|
||||||
color_attr_on(A_REVERSE);
|
color_attr_on(A_REVERSE);
|
||||||
}
|
}
|
||||||
char screenLine[CMDLINE_LNG];
|
char screenLine[CMDLINE_LNG];
|
||||||
snprintf(screenLine, getmaxx(stdscr),
|
snprintf(screenLine, getmaxx(stdscr)+1, "%s%-*.*s ",
|
||||||
"%s%s" SPACE_PADDING SPACE_PADDING SPACE_PADDING,
|
(terminal_has_colors()?" ":">"),
|
||||||
(terminal_has_colors()?" ":">"), text);
|
getmaxx(stdscr)-2, getmaxx(stdscr)-2, text);
|
||||||
mvprintw(y, 0, "%s", screenLine);
|
mvprintw(y, 0, "%s", screenLine);
|
||||||
if(hstr->theme & HH_THEME_COLOR) {
|
if(hstr->theme & HH_THEME_COLOR) {
|
||||||
color_attr_on(COLOR_PAIR(1));
|
color_attr_on(COLOR_PAIR(1));
|
||||||
|
|
Loading…
Reference in a new issue