Set window height for "autocmd window" when using nvim_buf_call
#28158
Unanswered
chipsenkbeil
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is connected to my attempt to address #27940.
Is there a way to set the size of the temporary window created when using
nvim_buf_call
if there is no window already hosting the buffer?Following along the code for
nvim_buf_call
, I can see where and how it allocates a new window. I noticed this because I was using a temporary buffer to add some lines of text, have them rendered based on filetype (org), and grab the extmarks to apply elsewhere; my way to selecting a range in a buffer and apply highlights to it as a different filetype.Code pointer
To get the above to work, I have to use
nvim_buf_call
where I re-detect the filetype usingfiletype detect
and then force a redraw usingredraw!
. Because the window is only 5 rows high, if I have a longer set of lines (say 7), then only the first 5 lines have extmarks applied in my situation.neovim/src/nvim/window.c
Lines 4030 to 4040 in d9235ef
Code Sample
Beta Was this translation helpful? Give feedback.
All reactions