From 045c5b33a6012bf79a77c7858553075ca5f0bc56 Mon Sep 17 00:00:00 2001 From: robin Date: Tue, 24 Mar 2026 16:57:10 +0000 Subject: [PATCH] fix(view): on open, always set cursor pos to after last char in input --- lua/artio/view.lua | 3 ++- 1 file(s) changed, 2 insertion(s)(+), 1 deletion(s)(-) diff --git a/lua/artio/view.lua b/lua/artio/view.lua --- a/lua/artio/view.lua +++ b/lua/artio/view.lua @@ -328,7 +328,7 @@ self:setopts() -- start insert *before* registering events - self:updatecursor() + self:updatecursor(#cmdbuff) vim._with({ noautocmd = true }, function() vim.cmd.startinsert({ bang = true }) end) @@ -455,6 +455,7 @@ pos = cursorpos[2] - promptlen end + -- set cursor pos to *at least* the prompt length curpos[2] = math.max(curpos[2], promptlen) if curpos[1] == promptidx + 1 and curpos[2] == promptlen + pos then -- tangled.sh