{"action":"created","issue":{"url":"https://api.github.com/repos/junegunn/fzf/issues/359","labels_url":"https://api.github.com/repos/junegunn/fzf/issues/359/labels{/name}","comments_url":"https://api.github.com/repos/junegunn/fzf/issues/359/comments","events_url":"https://api.github.com/repos/junegunn/fzf/issues/359/events","html_url":"https://github.com/junegunn/fzf/issues/359","id":108517051,"number":359,"title":"Behavior of sink* when match not found","user":{"login":"jebaum","id":2099704,"avatar_url":"https://avatars.githubusercontent.com/u/2099704?v=3","gravatar_id":"","url":"https://api.github.com/users/jebaum","html_url":"https://github.com/jebaum","followers_url":"https://api.github.com/users/jebaum/followers","following_url":"https://api.github.com/users/jebaum/following{/other_user}","gists_url":"https://api.github.com/users/jebaum/gists{/gist_id}","starred_url":"https://api.github.com/users/jebaum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jebaum/subscriptions","organizations_url":"https://api.github.com/users/jebaum/orgs","repos_url":"https://api.github.com/users/jebaum/repos","events_url":"https://api.github.com/users/jebaum/events{/privacy}","received_events_url":"https://api.github.com/users/jebaum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-27T06:10:40Z","updated_at":"2015-09-27T06:42:01Z","closed_at":null,"body":"I'm attempting to create a fzf.vim function which will either load a session (managed by https://github.com/manuel-colmenero/vim-simple-session) or create a new one. vim-simple-session contains a function called `s:SwitchSession` which, given a string, will switch to a session if it exists or create a new one by that name if it doesn't. I would expect the below code to work, but from what I can tell due to the commented out `echom` lines, the sink isn't getting called in the case that the exit status of fzf is 1 (a query was entered but there was no match). So the function works for switching to an existing session, but not for creating a new one.\r\n\r\nrelated: https://github.com/junegunn/fzf/issues/345\r\n\r\n```\r\nfunction! Fzfvimsessions()\r\n  let sessions = session#list()\r\n  \" call add(sessions, 'idk')\r\n  \" call add(sessions, 'bro')\r\n  \" echom join(sessions, \"::\")\r\n\r\n  call fzf#run({\r\n  \\ 'source':   sessions,\r\n  \\ 'sink*':    function('CallSimpleSessionSwitch'),\r\n  \\ 'window':  '10new',\r\n  \\ 'options': '--print-query -x --tiebreak=index --ansi --prompt=\"Sessions> \"',\r\n  \\})\r\nendfunction\r\n\r\nfunction! CallSimpleSessionSwitch(name)\r\n  \" echom 'wrapper to SwitchSession called'\r\n  \" echom join(a:name, \"--\")\r\n  \" due to --print-query, first item in list will be the typed query\r\n  let session_name = a:name[-1]\r\n  call SCall('plugin/session.vim', 'SwitchSession', [session_name])\r\nendfunction\r\n```"},"comment":{"url":"https://api.github.com/repos/junegunn/fzf/issues/comments/143524062","html_url":"https://github.com/junegunn/fzf/issues/359#issuecomment-143524062","issue_url":"https://api.github.com/repos/junegunn/fzf/issues/359","id":143524062,"user":{"login":"junegunn","id":700826,"avatar_url":"https://avatars.githubusercontent.com/u/700826?v=3","gravatar_id":"","url":"https://api.github.com/users/junegunn","html_url":"https://github.com/junegunn","followers_url":"https://api.github.com/users/junegunn/followers","following_url":"https://api.github.com/users/junegunn/following{/other_user}","gists_url":"https://api.github.com/users/junegunn/gists{/gist_id}","starred_url":"https://api.github.com/users/junegunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junegunn/subscriptions","organizations_url":"https://api.github.com/users/junegunn/orgs","repos_url":"https://api.github.com/users/junegunn/repos","events_url":"https://api.github.com/users/junegunn/events{/privacy}","received_events_url":"https://api.github.com/users/junegunn/received_events","type":"User","site_admin":false},"created_at":"2015-09-27T06:42:01Z","updated_at":"2015-09-27T06:42:01Z","body":"Cool, thanks. Exit status of 1 was a recent change, and I think I forgot to update the vim plugin accordingly."}}