Closed willothy closed 11 months ago
ok, now I understand what you want to achieve.
Shouldn't it be local win = vim.g.statusline_winid
instead though?
Also, feel free to remove that adding of win
as a parameter.
ok, now I understand what you want to achieve.
Shouldn't it be
local win = vim.g.statusline_winid
instead though?
Not sure, I'll try that! The temporary variables are a bit confusing to me (not sure when they're set and when they're not), get_current_win
definitely works though.
Nope, g:statusline_winid
seems to be nil
I changed the code so that it no longer requires passing win
.
Thanks!
Solution to what #47 attempted. When using
%{%}
nvim temporarily sets the current window so we can make use of the api to ensure we're always getting the correct window instead of relying on a number passed in on creation.This partially solves the dynamic title issue as well because people can just incorporate %!v:lua.edgy_winbar() into their own winbars without worrying about what window is being evaluated. It doesn't deal with the width issue though.