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