mirror of
https://github.com/dvorka/hstr.git
synced 2025-09-08 13:34:19 +08:00
Make print_help_label() preserve cursor position
Otherwise it might end up in a wrong part of the screen. An easy way to reproduce is to press <Ctrl-D> right after launching `hh`.
This commit is contained in:
parent
4e4fb4618b
commit
5c97716b13
1 changed files with 5 additions and 0 deletions
|
@ -474,10 +474,15 @@ void add_to_selection(Hstr *hstr, char *line, unsigned int *index)
|
|||
|
||||
void print_help_label()
|
||||
{
|
||||
int cursorX=getcurx(stdscr);
|
||||
int cursorY=getcury(stdscr);
|
||||
|
||||
char screenLine[CMDLINE_LNG];
|
||||
snprintf(screenLine, getmaxx(stdscr), "%s", LABEL_HELP);
|
||||
mvprintw(hstr->promptYHelp, 0, "%s", screenLine); clrtoeol();
|
||||
refresh();
|
||||
|
||||
move(cursorY, cursorX);
|
||||
}
|
||||
|
||||
void print_confirm_delete(const char *cmd, Hstr *hstr)
|
||||
|
|
Loading…
Add table
Reference in a new issue