Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- ./io.c.orig 2012-08-01 10:27:09.000000000 +0400
- +++ ./io.c 2012-08-01 10:49:59.000000000 +0400
- @@ -140,11 +140,12 @@
- saved_point = rl_point;
- saved_line = rl_copy_text(0, rl_end);
- -
- - rl_set_prompt("");
- - rl_replace_line("", 0);
- - rl_redisplay();
- +
- + printf("\0338\033[K");//vt100 commands,restore position,
- + //clear command prompt
- (*func)(data);
- + printf("\0337");//vt100 commands,save position
- + rl_reset_line_state();
- if (prog_running) {
- rl_set_prompt(prompt);
- rl_replace_line(saved_line, 0);
- @@ -189,7 +190,6 @@
- struct io_async_func_data* d = (struct io_async_func_data*)data;
- vprintf(d->fmt, d->args);
- - printf("\n");
- }
- void io_printfln(const char* const fmt, ...) {
- @@ -259,6 +259,7 @@
- }
- void io_init() {
- + printf("\0337");//vt100 commands,save position
- FD_ZERO(&fds);
- io_prompt_set(NET_ST_DISCONNECTED);
- install_line_handler();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement