mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-14 01:44:58 +00:00
Add a workaround for issue #1173
The readline compat layer for libedit which otherwise provides native readline functionality in NetBSD and MacOS appears to have a bug that causes subsequent prompts to be delayed until another line is being processed. Re-installing the callback over and over again works around that, and does not seem to harm with GNU libreadline.
This commit is contained in:
@@ -1290,6 +1290,15 @@ void term_gotline(char *cmdstr) {
|
|||||||
term_running = 0;
|
term_running = 0;
|
||||||
}
|
}
|
||||||
free(cmdstr);
|
free(cmdstr);
|
||||||
|
/*
|
||||||
|
* This is a workaround for a bug apparently present in the
|
||||||
|
* readline compat layer of libedit which is natively present in
|
||||||
|
* NetBSD and MacOS.
|
||||||
|
*
|
||||||
|
* see https://github.com/avrdudes/avrdude/issues/1173
|
||||||
|
*/
|
||||||
|
rl_callback_handler_remove();
|
||||||
|
rl_callback_handler_install("avrdude> ", term_gotline);
|
||||||
} else {
|
} else {
|
||||||
// call quit at end of file or terminal ^D
|
// call quit at end of file or terminal ^D
|
||||||
term_out("\n");
|
term_out("\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user