Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] I want a method that is called when redrawing #40

Closed
nabezokodaikon opened this issue May 15, 2024 · 4 comments
Closed

Comments

@nabezokodaikon
Copy link
Contributor

nabezokodaikon commented May 15, 2024

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): 94ad1d2

  • denops.vim version (SHA1): bcc88ca61f1edcbe364dbfb4967204193efc6e9a

  • deno version(deno -V output): deno 1.42.4

  • OS: Linux

  • neovim/Vim :version output: NVIM v0.10.0-dev-3023+g499070148

ddu-column-gitstatus

https://github.com/nabezokodaikon/ddu-column-gitstatus/blob/main/denops/%40ddu-columns/gitstatus.ts

@Shougo
Copy link
Owner

Shougo commented May 15, 2024

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.

@Shougo Shougo closed this as completed May 15, 2024
@Shougo Shougo reopened this May 15, 2024
@nabezokodaikon
Copy link
Contributor Author

In ddu-column-gitstatus, git information is held in the Column class, but is it different from that?

@Shougo
Copy link
Owner

Shougo commented May 17, 2024

I have implemented the feature.
Please use getBaseText().

@Shougo Shougo closed this as completed May 17, 2024
@nabezokodaikon
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants