From c076f9bdd9d0d56bb949f6fdb7694c83f8037fc2 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 29 Jan 2025 08:36:49 +0100 Subject: [PATCH] nvim/lua/user/plugins/editor.lua: fix cursor line for status column --- nvim/lua/user/plugins/editor.lua | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/nvim/lua/user/plugins/editor.lua b/nvim/lua/user/plugins/editor.lua index f4f0c6f..5ec59c8 100644 --- a/nvim/lua/user/plugins/editor.lua +++ b/nvim/lua/user/plugins/editor.lua @@ -102,24 +102,13 @@ return { }, { text = { builtin.foldfunc, " " }, click = "v:lua.ScFa" }, { - text = { icons.signcolum.separator }, - condition = { + text = { function(args) - local pos = vim.api.nvim_win_get_cursor(0) - return args.lnum ~= pos[1] - end - } + local pos = vim.api.nvim_win_get_cursor(args.win) + return (args.lnum == pos[1] and "%#SignColumnSep#%=" or "")..icons.signcolum.separator + end, + }, }, - { - text = { icons.signcolum.separator }, - hl = "SignColumnSep", - condition = { - function(args) - local pos = vim.api.nvim_win_get_cursor(0) - return args.lnum == pos[1] - end - } - } } } end,