{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/4452","repository_url":"https://api.github.com/repos/neovim/neovim","labels_url":"https://api.github.com/repos/neovim/neovim/issues/4452/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/4452/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/4452/events","html_url":"https://github.com/neovim/neovim/issues/4452","id":140776302,"number":4452,"title":"Python: accessing vim.current.window closes popupmenu (rplugin)","user":{"login":"blueyed","id":9766,"avatar_url":"https://avatars.githubusercontent.com/u/9766?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-14T19:35:31Z","updated_at":"2016-03-16T13:46:22Z","closed_at":null,"body":"- Neovim version: NVIM v0.1.3-344-gb030c90\r\n- Operating system: Linux\r\n- Terminal emulator: rxvt-unicode\r\n\r\n### Actual behaviour\r\n\r\nAccessing `vim.current.window.cursor` in a remote plugin will close any opened popup menu.\r\nThis seems to be the case for all properties on `vim.current.window` (at least also for `buffer`), but not `vim.current` itself.  The same applies to calling `vim.funcs.foo()`.\r\n\r\nI've noticed this in the context of deoplete, which does this to check if the position has changed:\r\n\r\nhttps://github.com/Shougo/deoplete.nvim/blob/816bea3a9a0c5a1cc53488256d452edea04cb70a/rplugin/python3/deoplete/deoplete.py#L315-L317\r\n\r\nIt does not seem to be a problem when calling it through `pyeval` in `i_CTRL-R_=`:\r\n\r\n> =pyeval('vim.funcs.pumvisible()')\r\n\r\nThat will insert 1, but keep the popupmenu / completion mode.\r\n\r\nThis is maybe a bug with https://github.com/neovim/python-client?! /cc @bfredl \r\n\r\n/cc @Shougo "},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/197339858","html_url":"https://github.com/neovim/neovim/issues/4452#issuecomment-197339858","issue_url":"https://api.github.com/repos/neovim/neovim/issues/4452","id":197339858,"user":{"login":"blueyed","id":9766,"avatar_url":"https://avatars.githubusercontent.com/u/9766?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T13:46:22Z","updated_at":"2016-03-16T13:46:22Z","body":"btw: I've tried the following, but it will also close the popup menu already:\r\n\r\n    diff --git i/rplugin/python3/deoplete/deoplete.py w/rplugin/python3/deoplete/deoplete.py\r\n    index f9b9431..456b888 100644\r\n    --- i/rplugin/python3/deoplete/deoplete.py\r\n    +++ w/rplugin/python3/deoplete/deoplete.py\r\n    @@ -53,6 +53,12 @@ def __init__(self, vim):\r\n             self.__profile_start = 0\r\n     \r\n         def completion_begin(self, context):\r\n    +        if self.__vim.eval('pumvisible()') == 1:\r\n    +            return\r\n\r\n@bfredl \r\nWhere is this happening in the code?"}}