{"action":"created","issue":{"url":"https://api.github.com/repos/mkasa/neco-ghc-lushtags/issues/3","labels_url":"https://api.github.com/repos/mkasa/neco-ghc-lushtags/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/mkasa/neco-ghc-lushtags/issues/3/comments","events_url":"https://api.github.com/repos/mkasa/neco-ghc-lushtags/issues/3/events","html_url":"https://github.com/mkasa/neco-ghc-lushtags/pull/3","id":110323985,"number":3,"title":"Correct behavior when restoring the working directory","user":{"login":"expipiplus1","id":857308,"avatar_url":"https://avatars.githubusercontent.com/u/857308?v=3","gravatar_id":"","url":"https://api.github.com/users/expipiplus1","html_url":"https://github.com/expipiplus1","followers_url":"https://api.github.com/users/expipiplus1/followers","following_url":"https://api.github.com/users/expipiplus1/following{/other_user}","gists_url":"https://api.github.com/users/expipiplus1/gists{/gist_id}","starred_url":"https://api.github.com/users/expipiplus1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expipiplus1/subscriptions","organizations_url":"https://api.github.com/users/expipiplus1/orgs","repos_url":"https://api.github.com/users/expipiplus1/repos","events_url":"https://api.github.com/users/expipiplus1/events{/privacy}","received_events_url":"https://api.github.com/users/expipiplus1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-07T21:40:16Z","updated_at":"2015-10-09T11:20:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mkasa/neco-ghc-lushtags/pulls/3","html_url":"https://github.com/mkasa/neco-ghc-lushtags/pull/3","diff_url":"https://github.com/mkasa/neco-ghc-lushtags/pull/3.diff","patch_url":"https://github.com/mkasa/neco-ghc-lushtags/pull/3.patch"},"body":"I'm no vimscript expert, and I don't know exactly why things weren't working with `lcd -`\r\nThe change saves the working directory to a local variable and restores it from that. This is the same as it's done elsewhere in the code."},"comment":{"url":"https://api.github.com/repos/mkasa/neco-ghc-lushtags/issues/comments/146837533","html_url":"https://github.com/mkasa/neco-ghc-lushtags/pull/3#issuecomment-146837533","issue_url":"https://api.github.com/repos/mkasa/neco-ghc-lushtags/issues/3","id":146837533,"user":{"login":"mkasa","id":416897,"avatar_url":"https://avatars.githubusercontent.com/u/416897?v=3","gravatar_id":"","url":"https://api.github.com/users/mkasa","html_url":"https://github.com/mkasa","followers_url":"https://api.github.com/users/mkasa/followers","following_url":"https://api.github.com/users/mkasa/following{/other_user}","gists_url":"https://api.github.com/users/mkasa/gists{/gist_id}","starred_url":"https://api.github.com/users/mkasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkasa/subscriptions","organizations_url":"https://api.github.com/users/mkasa/orgs","repos_url":"https://api.github.com/users/mkasa/repos","events_url":"https://api.github.com/users/mkasa/events{/privacy}","received_events_url":"https://api.github.com/users/mkasa/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T11:20:10Z","updated_at":"2015-10-09T11:20:10Z","body":"Then, let's add a rethrow at the end of the finally block.\r\n\r\n```vim\r\n  let l:dir = getcwd()\r\n  try\r\n    lcd `=expand('%:p:h')`\r\n    let l:cmd = ['lushtags'] + a:cmd\r\n    let l:ret = s:system(l:cmd)\r\n  finally\r\n    lcd `=l:dir`\r\n    throw v:exception\r\n  endtry\r\n```\r\n\r\nThis does not strictly equal to rethrowing in common languages,\r\nbut at least it lets errors go out of the block. See `:h rethrow` for details."}}