Hi,
On Thu, Apr 30, 2020 at 12:04 PM Ingo Karkat <[email protected]>
wrote:
> Yegappan, win_execute() does not cause an error:
>
> fun! TestComplete(findstart, base)
>
> call win_execute(win_getid((winnr() == 1) + 1), 'let g:line = getline(1)')
>
>
You can do this without using a global variable.
let line = win_execute(win_getid((winnr() == 1) + 1), 'echon
getline(1)')
>
> return (a:findstart ? col('.') : [g:line])
> endfun
>
> However, it wouldn't be trivial to change the plugin, and both the
> translation of currently open windows to ids and the transfer of the data
> (above done via global variable) don't look very elegant. On the other
> hand, win_execute() seems to have at least one nice property that my
> current implementation has to work around: When entering a window, the
> height may increase from 0 (which can happen with *Rolodex mode*) to 1.
> Too bad that it's only been introduced in version 8.2.
>
> Besides, what's the use of E839: Completion function changed window if
> this is now pre-empted by E565: Not allowed to change text here?!
>
>
>
I will let Bram comment on this change.
Regards,
Yegappan
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/CAAW7x7kGZ%3DY0%2B-ZxraFRShnaga5gBrOs8FKzo%3D%3D_f%2BB8JUQk8g%40mail.gmail.com.