bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What, exactly, _is_ "line-breakout optimization"?


From: Benno Schulenberg
Subject: Re: What, exactly, _is_ "line-breakout optimization"?
Date: Sun, 19 May 2024 17:09:52 +0200
User-agent: Mozilla Thunderbird


Op 19-05-2024 om 15:59 schreef G. Branden Robinson:
    typeahead
      curses does “line‐breakout optimization” by looking for typeahead
      periodically while updating the screen.  If input is found, and it
      is coming from a terminal, the current update is postponed until
      refresh(3NCURSES) or doupdate is called again.  This allows faster
      response to commands typed in advance.  Normally, the input FILE
      pointer passed to newterm, or stdin in the case that initscr was
      used, will be used to do this typeahead checking.  The typeahead
      routine specifies that the file descriptor fd is to be used to
      check for typeahead instead.  If fd is -1, then no typeahead
      checking is done.

Does this mean that ncurses does this typeahead checking by default,
and that one needs to call typeahead(-1) to switch it off?

Isn't that weird?  What if the typeahead keystroke is one that doesn't
result in another call of doupdate()?


Benno

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]