From 990b420cbe450e53d58fee0378ebe2b5089f2384 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 3 Aug 2026 17:06:18 +0000 Subject: [PATCH] [audit] Fix vim.ui.img.set() row/col to 1-indexed per documented API vim.ui.img.Opts.row/col are documented as 1-indexed (see runtime/lua/vim/ui/img.lua and its kitty backend, which builds the cursor-position escape as \027[%d;%dH from opts.row/col). preview_image() passed row = 0, col = 0, which is truthy in Lua so it's forwarded literally as position 0 -- outside the documented contract, relying on terminals clamping 0 to 1 rather than the documented 1-indexed API. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01GJzu414NEM2wcAQMtMZYhY --- lua/config/image.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/image.lua b/lua/config/image.lua index be1f5cd..e1b2933 100644 --- a/lua/config/image.lua +++ b/lua/config/image.lua @@ -5,7 +5,7 @@ local function preview_image(path) -- mod_ui.Window.create_tmp_float_window() local id = vim.ui.img.set( vim.fn.readblob(path), - { row = 0, col = 0, width = 100, height = 50, zindex = 0 } + { row = 1, col = 1, width = 100, height = 50, zindex = 0 } ) return id end