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

feat: trigger TextChanged event after updating buffer #474

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MeanderingProgrammer
Copy link

Details

Some users (or at least 1) use a plugin I own render-markdown.nvim to view ChatGPT sessions. My plugin adds some highlights and icons to improve viewing markdown in neovim.

When a session is changed from the sessions panel the nvim_buf_set_lines API is called which updates the contents of the buffer. However on my plugin's side I am unable to "see" that anything changed so do not update the rendering leading to this issue: MeanderingProgrammer/render-markdown.nvim#210.

To bridge this gap I added a manual trigger of the TextChanged event after the API call which lets my plugin re-render the buffer.

LMK if there are any concerns with the change or if there is another approach I can take, 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

Successfully merging this pull request may close these issues.

1 participant