{"action":"closed","issue":{"url":"https://api.github.com/repos/jalvesaq/Nvim-R/issues/300","repository_url":"https://api.github.com/repos/jalvesaq/Nvim-R","labels_url":"https://api.github.com/repos/jalvesaq/Nvim-R/issues/300/labels{/name}","comments_url":"https://api.github.com/repos/jalvesaq/Nvim-R/issues/300/comments","events_url":"https://api.github.com/repos/jalvesaq/Nvim-R/issues/300/events","html_url":"https://github.com/jalvesaq/Nvim-R/issues/300","id":306540960,"number":300,"title":"Object omni-completion not working","user":{"login":"ashiklom","id":5680221,"avatar_url":"https://avatars0.githubusercontent.com/u/5680221?v=4","gravatar_id":"","url":"https://api.github.com/users/ashiklom","html_url":"https://github.com/ashiklom","followers_url":"https://api.github.com/users/ashiklom/followers","following_url":"https://api.github.com/users/ashiklom/following{/other_user}","gists_url":"https://api.github.com/users/ashiklom/gists{/gist_id}","starred_url":"https://api.github.com/users/ashiklom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashiklom/subscriptions","organizations_url":"https://api.github.com/users/ashiklom/orgs","repos_url":"https://api.github.com/users/ashiklom/repos","events_url":"https://api.github.com/users/ashiklom/events{/privacy}","received_events_url":"https://api.github.com/users/ashiklom/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-19T16:40:43Z","updated_at":"2018-03-19T16:56:33Z","closed_at":"2018-03-19T16:56:33Z","author_association":"CONTRIBUTOR","body":"I think there might be a bug in the object omni-completion (`R_complete = 2`). I am using a test script that looks like this:\r\n\r\n```r\r\nvery_long_variable <- list(\r\n  apple = 5,\r\n  orange = 10,\r\n  banana = 15\r\n)\r\nvery_long_variable2 <- 10\r\n\r\nvery_long_[*]\r\n```\r\n\r\nAfter `source`ing the file, with the cursor at the `[*]`, I press `C-X C-O` and get the \"Pattern not found\" error.\r\n\r\nAfter digging around, I found this block at the end of the definition for `BuildROmniList` in `R/common_global.vim`:\r\n\r\n```vim\r\n    if string(g:SendCmdToR) != \"function('SendCmdToR_fake')\"\r\n        let s:globalenv_lines = []\r\n    else\r\n        let s:globalenv_lines = readfile(g:rplugin_tmpdir . \"/GlobalEnvList_\" . $NVIMR_ID)\r\n    endif\r\n```\r\n\r\nIf I change `!=` to `==` in the `if` statement, the completion works as expected.\r\n\r\nIs this a bug? Shouldn't we be returning blank global environment lines if R is _not_ loaded, rather than if it _is_ loaded (which I think is what the equality is testing for)?"}}
{"actor":{"display_login":"jalvesaq"}}