From 463b10ee291383011baa5571d187e0ca76037f07 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 14 Mar 2024 12:26:48 -0600 Subject: Some fixes to the display when dealing with no number column and textoff. --- lua/warp/col_selectors/grid.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lua/warp/col_selectors') diff --git a/lua/warp/col_selectors/grid.lua b/lua/warp/col_selectors/grid.lua index 7ad5847..2ee24a9 100644 --- a/lua/warp/col_selectors/grid.lua +++ b/lua/warp/col_selectors/grid.lua @@ -38,6 +38,7 @@ local function char_at(s, i) end M.strategy = function() + local leftcol = vim.fn.winsaveview().leftcol local filter return util.wrap_col_selector({ @@ -55,7 +56,7 @@ M.strategy = function() width = width + 1 end - local unfiltered = big_line:sub(1, width) + local unfiltered = big_line:sub(leftcol + 1, width) local line = unfiltered if filter then @@ -99,6 +100,7 @@ M.strategy = function() end M.run = function () + print(big_line) M.strategy().run() end -- cgit