Created
May 7, 2013 14:21
-
-
Save agrif/5532914 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void carl_async_print(print_func func, void* data) | |
| { | |
| char* saved_line; | |
| int saved_point; | |
| struct readline_state rlstate; | |
| //saved_point = rl_point; | |
| //saved_line = rl_copy_text(0, rl_end); | |
| //rl_save_prompt(); | |
| rl_save_state(&rlstate); | |
| rl_set_prompt(""); | |
| rl_replace_line("", 0); | |
| rl_redisplay(); | |
| (*func)(data); | |
| //rl_replace_line(saved_line, 0); | |
| //rl_restore_prompt(); | |
| //rl_point = saved_point; | |
| rl_restore_state(&rlstate); | |
| rl_forced_update_display(); | |
| //free(saved_line); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment