mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Fix KEY_RESIZE loop
This commit is contained in:
parent
3dd95fd9a8
commit
5734f49126
16
src/nnn.c
16
src/nnn.c
|
@ -588,22 +588,20 @@ static void printprompt(const char *str)
|
|||
|
||||
static int get_input(const char *prompt)
|
||||
{
|
||||
int r;
|
||||
int r = KEY_RESIZE;
|
||||
|
||||
if (prompt)
|
||||
printprompt(prompt);
|
||||
cleartimeout();
|
||||
#ifdef KEY_RESIZE
|
||||
do {
|
||||
while (r == KEY_RESIZE) {
|
||||
r = getch();
|
||||
if (r == KEY_RESIZE) {
|
||||
if (prompt) {
|
||||
clearoldprompt();
|
||||
xlines = LINES;
|
||||
printprompt(prompt);
|
||||
}
|
||||
if (r == KEY_RESIZE && prompt) {
|
||||
clearoldprompt();
|
||||
xlines = LINES;
|
||||
printprompt(prompt);
|
||||
}
|
||||
} while (r == KEY_RESIZE);
|
||||
};
|
||||
#else
|
||||
r = getch();
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue