Closed nabezokodaikon closed 6 months ago
If you really need the feature, the length should be cached in your column.
The "getLength" method is called every time a directory is opened, and the "getText" method is called every time an item is drawn, but I would like a method to be run on first display and on "redraw".
getLength()
depends all items and all items are recreated when you have opened/closed directories.
In ddu-column-gitstatus, git information is held in the Column class, but is it different from that?
I have implemented the feature.
Please use getBaseText()
.
Thank you!
The "getLength" method is called every time a directory is opened, and the "getText" method is called every time an item is drawn, but I would like a method to be run on first display and on "redraw".
The reason is that I created a plugin that displays the Git status in a "column", but since the "git status" command is executed within the "getLength" method, the process becomes redundant.
Environment Information
ddu-ui-filer version (SHA1): 94ad1d215fd48a4ef2311532a7383d44370ed53c
denops.vim version (SHA1): bcc88ca61f1edcbe364dbfb4967204193efc6e9a
deno version(
deno -V
output): deno 1.42.4OS: Linux
neovim/Vim
:version
output: NVIM v0.10.0-dev-3023+g499070148ddu-column-gitstatus
https://github.com/nabezokodaikon/ddu-column-gitstatus/blob/main/denops/%40ddu-columns/gitstatus.ts