On Mon, Oct 5, 2009 at 2:22 AM, Hans Lub <[email protected]> wrote:
> When select() returns with stdin readable, you just call
> rl_callback_read_char()

Thanks, but I have all that already working (I'm using liboop for the
asynchronous I/O and it has a readline adapter). My question is not
about I/O, only about display.

> When it returns with your other descriptor readable, you can read, and
> display the information as you see fit (possibly using rl_message)

I have tried with rl_message and it works as long as the prompt is on
a single line but the display seems to get messed up with prompts
spanning multiple rows. Specifically, I have tried:

      rl_save_prompt();
      rl_message("%s", text);
      rl_restore_prompt();
      rl_clear_message();

> If you moved the cursor you'll have to move it back to its original place,
> possibly with some "low level terminal interaction"  If you messed up the
> screen, you may have to call rl_redisplay()

I would like to avoid fiddling on the low level if possible. Is there
no way to do this otherwise?


_______________________________________________
Bug-readline mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to