Skip to content

Conversation

justinmk
Copy link
Member

  • Revert timer-based approach.
  • Instead, call loop_poll_events() with a timeout in an "active" loop,
    to infer that "TUI startup activity has mostly finished", but also to
    enforce a mininum time (100 ms) before emitting "enable focus
    reporting" termcode. (If TUI startup takes longer than that minimum
    time, it's probably a slow environment anyways.)
  • Tickle main_loop by sending a dummy event. Without this, the
    initial "focus-gained" response from the terminal may not get
    processed until the user hits a key.

ref #7220
ref #7664
ref #7649
ref #7664
ref 27f9b1c

- Revert timer-based approach.
- Instead, call loop_poll_events() with a timeout in an "active" loop,
  to infer that "TUI startup activity has mostly finished", but also to
  enforce a mininum time (100 ms) before emitting "enable focus
  reporting" termcode. (If TUI startup takes longer than that minimum
  time, it's probably a slow environment anyways.)
- Tickle `main_loop` by sending a dummy event.  Without this, the
  initial "focus-gained" response from the terminal may not get
  processed until the user hits a key.

ref neovim#7720
ref neovim#7664
ref neovim#7649
ref neovim#7664
ref 27f9b1c
@justinmk justinmk merged commit bfb21f3 into neovim:master Dec 16, 2017
@justinmk justinmk deleted the tmux-redux branch December 16, 2017 14:03
blueyed added a commit to blueyed/neovim that referenced this pull request Sep 24, 2019
This avoids having a dummy event to tickle the main loop.

Confirmed using `nvim -u NONE -c 'au FocusGained * q'` in tmux (with
`:set -g focus-events on`): without the flushing it would only exit
after pressing a key.

Moves the flushing done recently in 3626d21.
`nvim -u NONE -cq` is still working (i.e. consuming the response for the
terminal background query itself), and the flickering mentioned in
3626d21 is reduced again.

Reverts part of bfb21f3 (neovim#7729).
blueyed added a commit that referenced this pull request Sep 24, 2019
This avoids having a dummy event to tickle the main loop.

Confirmed using `nvim -u NONE -c 'au FocusGained * q'` in tmux (with
`:set -g focus-events on`): without the flushing it would only exit
after pressing a key.

Moves the flushing done recently in 3626d21.
`nvim -u NONE -cq` is still working (i.e. consuming the response for the
terminal background query itself), and the flickering mentioned in
3626d21 is reduced again.

Reverts part of bfb21f3 (#7729).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant