Closed gukz closed 9 months ago
related: #1510 missing diagnostic placement
This is fantastic news! It allows more flexibility for sign placement.
I don't think this is ready yet:
:; nvim --version
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.1692616192
nvim --clean README.md
:let &statuscolumn="%=%{v:relnum?v:relnum:v:lnum} "
Cursor down and watch the line number become corrupted:
Let's revisit this once the feature is ready.
@alex-courtis I can't replicate issue you described above. There were numerous fixes regarding statuscolumn
on master since September.
Still happening on 0.9.4
xterm:
master (983defd28) too.
I think I'm doing it wrong.
@alex-courtis According to the documentation of statuscolumn
:
When using v:relnum, keep in mind that cursor movement by itself will not cause the 'statuscolumn' to update unless 'relativenumber' is set.
It says that if one want to use v:relnum
, one must also set relativenumber
to keep line number updated.
So, if you set
:set relativenumber
:let &statuscolumn="%=%{v:relnum?v:relnum:v:lnum} "
the corrupted line numbers go away. :)
@alex-courtis According to the documentation of
statuscolumn
:When using v:relnum, keep in mind that cursor movement by itself will not cause the 'statuscolumn' to update unless 'relativenumber' is set.
It says that if one want to use
v:relnum
, one must also setrelativenumber
to keep line number updated.So, if you set
:set relativenumber :let &statuscolumn="%=%{v:relnum?v:relnum:v:lnum} "
the corrupted line numbers go away. :)
That works beautifully: view.relativenumber = true
results in :let &statuscolumn="%=%{v:relnum?v:relnum:v:lnum} "
functioning correctly.
@gukz are you satisfied with this outcome?
@alex-courtis that's so cool, everything just works!!! a big thank you.
Neovim has support the new feature: statuscolumn https://github.com/neovim/neovim/pull/20621 please allow user config this property and set it to the tree window buffer.
currently, if I set the statuscolumn for global, the tree window's statuscolumn will not always update. see below, I set the
statuscolumn="%=%{v:relnum?v:relnum:v:lnum} "
what am I request for? 1, allow user customize the statuscolumn just like the signcolumn. 2, fix the statuscolumn update bug (optional)