From 40258d5d05446d8b048d4830db617f76b8d35b28 Mon Sep 17 00:00:00 2001 From: Volodymyr Chernetskyi Date: Wed, 2 Sep 2026 22:04:32 +0200 Subject: [PATCH] fix(health): correct reporting messages #41632 Problems: - Slow shell check measures time in nanoseconds, but reports seconds. - `kdch1` check incorrectly tests `kbs_entry` instead. - curl version is passed as an advice, so it is never reported. Solutions: - Scale the elapsed time to seconds before reporting. - Test `kdch1_entry` for `kdch1` check. - Format curl warning with `string.format()`. AI-assisted --- runtime/lua/vim/health/health.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/lua/vim/health/health.lua b/runtime/lua/vim/health/health.lua index c3bbb70abc..8ba44a748a 100644 --- a/runtime/lua/vim/health/health.lua +++ b/runtime/lua/vim/health/health.lua @@ -290,7 +290,7 @@ local function check_performance() local elapsed_time = vim.uv.hrtime() - start_time if elapsed_time > slow_cmd_time then health.warn( - 'Slow shell invocation (took ' .. vim.fn.printf('%.2f', elapsed_time) .. ' seconds).' + 'Slow shell invocation (took ' .. vim.fn.printf('%.2f', elapsed_time / 1e9) .. ' seconds).' ) end @@ -520,7 +520,7 @@ local function check_infocmp() health.info( vim.fn.printf( 'key_dc (kdch1) terminfo entry: `%s`', - (kbs_entry == '' and '? (not found)' or kdch1_entry) + (kdch1_entry == '' and '? (not found)' or kdch1_entry) ) ) end @@ -597,7 +597,7 @@ local function check_external_tools() return end if vim.version.le(curl_version, { 7, 12, 3 }) then - health.warn('curl version %s not compatible', curl_version) + health.warn(('curl version %s not compatible'):format(curl_version)) return end local lines = { string.format('curl %s (%s)', curl_version, curl_path) }