Relative line number always shows current line number as 0
cdmill opened this issue · comments
cdmill commented
As shown in the image below, statuscol is always showing the current line as 0. Not exactly sure if this is due to my config or other reasons, or if anyone else is having this problem.
In builtin.lua
the following change fixes the problem for me:
function M.lnumfunc(args, fa)
if args.sclnu and fa.sign and fa.sign.wins[args.win].signs[args.lnum] then
return "%="..M.signfunc(args, fa)
end
if not args.rnu and not args.nu then return "" end
if args.virtnum ~= 0 then return "%=" end
local lnum = args.rnu and (args.relnum > 0 and args.relnum
+ or (args.nu and args.lnum)) or args.lnum
- or (args.nu and args.lnum or 0)) or args.lnum
If you want I can submit a PR, but it's a pretty small change as it is. I haven't exactly tested if there are any unwanted side-effects from this change, but as far as I can tell everything is working fine.
cdmill commented
SOLVED: was from an outside issue.