Advertisement
Guest User

Untitled

a guest
Aug 1st, 2012
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.89 KB | None | 0 0
  1. --- ./io.c.orig 2012-08-01 10:27:09.000000000 +0400
  2. +++ ./io.c  2012-08-01 10:49:59.000000000 +0400
  3. @@ -140,11 +140,12 @@
  4.  
  5.     saved_point = rl_point;
  6.     saved_line = rl_copy_text(0, rl_end);
  7. -
  8. -   rl_set_prompt("");
  9. -   rl_replace_line("", 0);
  10. -   rl_redisplay();
  11. +  
  12. +   printf("\0338\033[K");//vt100 commands,restore position,
  13. +         //clear command prompt
  14.     (*func)(data);
  15. +   printf("\0337");//vt100 commands,save position
  16. +   rl_reset_line_state();
  17.     if (prog_running) {
  18.         rl_set_prompt(prompt);
  19.         rl_replace_line(saved_line, 0);
  20. @@ -189,7 +190,6 @@
  21.     struct io_async_func_data* d = (struct io_async_func_data*)data;
  22.  
  23.     vprintf(d->fmt, d->args);
  24. -   printf("\n");
  25.  }
  26.  
  27.  void io_printfln(const char* const fmt, ...) {
  28. @@ -259,6 +259,7 @@
  29.  }
  30.  
  31.  void io_init() {
  32. +   printf("\0337");//vt100 commands,save position
  33.     FD_ZERO(&fds);
  34.     io_prompt_set(NET_ST_DISCONNECTED);
  35.     install_line_handler();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement