fix(health): fix tmux_esc_time comparison

Regression from the health.vim to .lua changes.

Unlike Vim script, Lua does not implicitly convert strings to numbers, so this
comparison threw an error.
This commit is contained in:
Sean Dewar
2023-01-16 10:37:14 +00:00
parent ef89f9fd46
commit 60df0c0651

View File

@@ -273,7 +273,7 @@ local function check_tmux()
if tmux_esc_time ~= 'error' then if tmux_esc_time ~= 'error' then
if empty(tmux_esc_time) then if empty(tmux_esc_time) then
health.report_error('`escape-time` is not set', suggestions) health.report_error('`escape-time` is not set', suggestions)
elseif tmux_esc_time > 300 then elseif tonumber(tmux_esc_time) > 300 then
health.report_error( health.report_error(
'`escape-time` (' .. tmux_esc_time .. ') is higher than 300ms', '`escape-time` (' .. tmux_esc_time .. ') is higher than 300ms',
suggestions suggestions