file_modified icon is not buffer local
ttytm opened this issue ยท 3 comments
Hey Mr. wind ๐, thank you for building this next level status line plugin ๐ฅ. Also, for the maintenance and solving the last opened issue.
I'm being bold enough to open another one - hoping that's not too bothering ๐.
The problem the issue title describes reveals itself using the file_modified component in an inactive status line. The component will use the state of the currently active buffer instead of the local buffer. Modifying a buffer will show the modified icon in the inactive buffer even when no modifications happen.
I tried to solve it by mimicking the cache variant of other components like you for example for the file_name and file icon. Unfortunately I wasn't able to solve it that way. Maybe it's something really simple I didn't spot.
i fix that you can use file_modified("+", true) for use it on inactive buffer
Awesome, thank you!
I just came to test it. It seems that adding the true arg always enables the modified icon, no matter the modified state.
You are probably pretty busy so I hope it's okay to submit a PR. Based on your previous commit it allowed me to fix it with this one.