{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/2674","labels_url":"https://api.github.com/repos/neovim/neovim/issues/2674/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/2674/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/2674/events","html_url":"https://github.com/neovim/neovim/pull/2674","id":77048841,"number":2674,"title":"[RFC]fix flick in popup menu","user":{"login":"SolaWing","id":3897953,"avatar_url":"https://avatars.githubusercontent.com/u/3897953?v=3","gravatar_id":"","url":"https://api.github.com/users/SolaWing","html_url":"https://github.com/SolaWing","followers_url":"https://api.github.com/users/SolaWing/followers","following_url":"https://api.github.com/users/SolaWing/following{/other_user}","gists_url":"https://api.github.com/users/SolaWing/gists{/gist_id}","starred_url":"https://api.github.com/users/SolaWing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolaWing/subscriptions","organizations_url":"https://api.github.com/users/SolaWing/orgs","repos_url":"https://api.github.com/users/SolaWing/repos","events_url":"https://api.github.com/users/SolaWing/events{/privacy}","received_events_url":"https://api.github.com/users/SolaWing/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neovim/neovim/labels/bug-vim","name":"bug-vim","color":"fc2929"},{"url":"https://api.github.com/repos/neovim/neovim/labels/RFC","name":"RFC","color":"dfdfdf"},{"url":"https://api.github.com/repos/neovim/neovim/labels/sent%20to%20vim_dev","name":"sent to vim_dev","color":"006b75"},{"url":"https://api.github.com/repos/neovim/neovim/labels/waiting:rework","name":"waiting:rework","color":"dfdfdf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-05-16T14:19:16Z","updated_at":"2015-12-01T22:25:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/2674","html_url":"https://github.com/neovim/neovim/pull/2674","diff_url":"https://github.com/neovim/neovim/pull/2674.diff","patch_url":"https://github.com/neovim/neovim/pull/2674.patch"},"body":"as #2661 says, I spend a day to fix the annoying flick.\r\n\r\nIn detail, I `update_screen` before restart_complete, and remove `update_screen` in `ins_compl_new_leader`, so the screen will stay with last popup menu, until the complete function returns  and update screen. Instead of block without popup menu, which disappear and reappear, causing flick.\r\n\r\nAnother change is when typed char, call the `ins_compl_new_leader` even `refresh_always` is setted. So complete func can immediately get called after change leader char. Instead of have to waiting for `CursorMoved` event and reinvoke complete function by feedkeys, which also cause flick. \r\n\r\nThe last change is if restart_complete with new_leader, and in user complete func, refresh_always is set, free `compl_leader`, so popup menu doesn't use prefix as a filter. this cause all the result returned by complete func valid. This make more sense for fuzzy complete func, which need completely control complete and filter. The return candidate certainly may not match with the prefix, since it use itself match rule. "},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/161116017","html_url":"https://github.com/neovim/neovim/pull/2674#issuecomment-161116017","issue_url":"https://api.github.com/repos/neovim/neovim/issues/2674","id":161116017,"user":{"login":"Shougo","id":41495,"avatar_url":"https://avatars.githubusercontent.com/u/41495?v=3","gravatar_id":"","url":"https://api.github.com/users/Shougo","html_url":"https://github.com/Shougo","followers_url":"https://api.github.com/users/Shougo/followers","following_url":"https://api.github.com/users/Shougo/following{/other_user}","gists_url":"https://api.github.com/users/Shougo/gists{/gist_id}","starred_url":"https://api.github.com/users/Shougo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shougo/subscriptions","organizations_url":"https://api.github.com/users/Shougo/orgs","repos_url":"https://api.github.com/users/Shougo/repos","events_url":"https://api.github.com/users/Shougo/events{/privacy}","received_events_url":"https://api.github.com/users/Shougo/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T22:25:37Z","updated_at":"2015-12-01T22:25:37Z","body":"https://gist.github.com/Shougo/344a41fcd0bf488c2527\r\n\r\nI have created the patch for Vim.\r\nI will send it to vim_dev after it is reviewed."}}