Thursday, June 22, 2017

Re: Is there any way to update a buffer in the background?

On Di, 14 Mär 2017, Yegappan Lakshmanan wrote:

> On Tue, Mar 14, 2017 at 2:41 PM, Christian Brabandt <cblists@256bit.org> wrote:
> > We already have getbufline() but are missing setbufline()
>
> I submitted a patch back in 2003 to add the setbufline() function.
> Refer to the following e-mail threads:
>
> https://marc.info/?l=vim-dev&m=104308972718854&w=3
> http://vim.1045645.n5.nabble.com/Re-missing-setbufline-td1200781.html
>
> But there were problems in changing the lines in a buffer. So this was
> not incorporated at that time.
>
> Looking at the latest todo.txt, I see the following patches:
>
> Patch to add setbufline(). (email from Yasuhiro Matsumoto, patch by Ozaki
> Kiichi, 2016 Feb 28)
> Update Mar 8: https://gist.github.com/mattn/23c1f50999084992ca98
> Update Mar 13: https://gist.github.com/mattn/23c1f50999084992ca98

It would be great, if this could be merged. Note, I haven't checked the
patch, however I notice that when using job_start(cmd, 'out_buf': bufnr)
it does already update a buffer even if the cursor is on a different
buffer. So it looks like it shouldn't be too hard to have the same
functionality in a new setbufline() vimscript function available.

Best,
Christian

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: