feat(tui): restore 'ttyfast' to control tty requests #38699

Problem:
When running nvim on a remote machine over SSH, if there is high ping,
then bg detection may not complete in time. This results in a warning
every time nvim is started. #38648

Solution:
Restore 'ttyfast' option and allow it to control whether or not bg
detection is performed. Because this is during startup and before any
user config or commands, we use the environment variable
`NVIM_NOTTYFAST` to allow disabling `ttyfast` during initialization.
This commit is contained in:
Kyle
2026-04-24 13:45:20 -05:00
committed by GitHub
parent 393f687503
commit 66149ca668
11 changed files with 53 additions and 9 deletions

View File

@@ -9777,12 +9777,20 @@ local options = {
{
abbreviation = 'tf',
defaults = true,
desc = [=[
Assume that the underlying terminal can respond quickly to queries
required by features such as 'background' detection.
Nvim issues terminal queries before reading the user's |config| file,
so disabling this option there will not work. Set $NVIM_NOTTYFAST
before starting Nvim to disable terminal queries.
]=],
full_name = 'ttyfast',
no_mkrc = true,
scope = { 'global' },
short_desc = N_('Deprecated'),
short_desc = N_('assume terminal responds quickly, enabling more features'),
type = 'boolean',
immutable = true,
varname = 'p_tf',
},
{
abbreviation = 'udir',