mirror of
https://github.com/troglobit/editline.git
synced 2025-11-07 13:44:26 +08:00
Only display return from readline() when there's something to show.
This commit is contained in:
@@ -114,7 +114,8 @@ int main(int ac __attribute__ ((unused)), char *av[] __attribute__ ((unused)))
|
|||||||
read_history(HISTORY);
|
read_history(HISTORY);
|
||||||
|
|
||||||
while ((line = readline(prompt)) != NULL) {
|
while ((line = readline(prompt)) != NULL) {
|
||||||
printf("\t\t\t|%s|\n", line);
|
if (*line != '\0')
|
||||||
|
printf("\t\t\t|%s|\n", line);
|
||||||
free(line);
|
free(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user