• Justin M. Keyes's avatar
    'inccommand': Detect "non-interactive", "too slow". · 91507c27
    Justin M. Keyes authored
      - Check (current_SID == 0) instead of KeyTyped
        - We want to update during mappings (KeyTyped is false then).
      - Check vpeekc_any()
        - Avoids unnecessary work.
        - Avoids triggering live preview during macros.
        - Caveat: This makes the redraw "stutter" if user spams (holds a key)
          in the replace pattern. But that scenario is not important.
      - Update screen if the command is changed to a non-live command.
        (`s->live` goes from true => false) => clears the preview
      - Let CTRL-C cancel live preview
      - Enforce a time limit ('redrawtime').
      - Unset 'inccommand' if time limit is reached.
    Closes #5602
    Closes #5585
option.h 932 Bytes