{"action":"created","issue":{"url":"https://api.github.com/repos/atom/autocomplete-plus/issues/956","repository_url":"https://api.github.com/repos/atom/autocomplete-plus","labels_url":"https://api.github.com/repos/atom/autocomplete-plus/issues/956/labels{/name}","comments_url":"https://api.github.com/repos/atom/autocomplete-plus/issues/956/comments","events_url":"https://api.github.com/repos/atom/autocomplete-plus/issues/956/events","html_url":"https://github.com/atom/autocomplete-plus/issues/956","id":297960355,"number":956,"title":"Cannot read property 'replace' of undefined in certain filetypes","user":{"login":"tylerFowler","id":5419372,"avatar_url":"https://avatars2.githubusercontent.com/u/5419372?v=4","gravatar_id":"","url":"https://api.github.com/users/tylerFowler","html_url":"https://github.com/tylerFowler","followers_url":"https://api.github.com/users/tylerFowler/followers","following_url":"https://api.github.com/users/tylerFowler/following{/other_user}","gists_url":"https://api.github.com/users/tylerFowler/gists{/gist_id}","starred_url":"https://api.github.com/users/tylerFowler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylerFowler/subscriptions","organizations_url":"https://api.github.com/users/tylerFowler/orgs","repos_url":"https://api.github.com/users/tylerFowler/repos","events_url":"https://api.github.com/users/tylerFowler/events{/privacy}","received_events_url":"https://api.github.com/users/tylerFowler/received_events","type":"User","site_admin":false},"labels":[{"id":83095460,"url":"https://api.github.com/repos/atom/autocomplete-plus/labels/bug","name":"bug","color":"f7c6c7","default":true},{"id":505039457,"url":"https://api.github.com/repos/atom/autocomplete-plus/labels/triaged","name":"triaged","color":"00bb00","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":27,"created_at":"2018-02-17T00:32:30Z","updated_at":"2018-04-10T17:33:53Z","closed_at":"2018-04-09T20:15:01Z","author_association":"NONE","body":"*Edit by @rsese to add repro steps*\r\n\r\n1. Start Atom in safe mode `atom --safe`\r\n2. Add `_` to `Settings > Editor > Non Word Characters`\r\n3. Create a new file\r\n4. Start typing in the new file\r\n\r\nmacOS 10.12.6 and Atom 1.25.\r\n\r\n---\r\n\r\nI find that in certain file types I get this exception thrown (Atom Beta). So far I've found it reliably does it in git commit message types (invoked by git-plus) and in Go files, but have not seen it with the same version in JS or Java files. It tends to keep throwing this error over and over as I type.\r\n\r\nWorth noting this error was definitely *not* present until the latest Beta update, which included autocomplete-plus version 2.40.2\r\n\r\n**Atom**: 1.25.0-beta0 x64\r\n**Electron**: 1.7.11\r\n**OS**: Mac OS X 10.13.3\r\n**Thrown From**: Atom Core\r\n\r\n\r\n### Stack Trace\r\n\r\nUncaught TypeError: Cannot read property 'replace' of undefined\r\n\r\n```\r\nAt /Applications/Atom Beta.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/autocomplete-manager.js:527\r\n\r\nTypeError: Cannot read property 'replace' of undefined\r\n    at AutocompleteManager.getWordCharacterRegex (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/autocomplete-manager.js:527:72)\r\n    at AutocompleteManager.getPrefix (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/autocomplete-manager.js:507:43)\r\n    at AutocompleteManager.findSuggestions (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/autocomplete-manager.js:260:31)\r\n```\r\n\r\n### Commands\r\n\r\n```\r\n  2x -0:09.1.0 core:move-down (input.hidden-input)\r\n     -0:07.3.0 editor:delete-to-beginning-of-word (input.hidden-input)\r\n     -0:06.6.0 core:backspace (input.hidden-input)\r\n     -0:05.8.0 editor:delete-to-beginning-of-word (input.hidden-input)\r\n     -0:04.3.0 core:move-up (input.hidden-input)\r\n```\r\n\r\n### Non-Core Packages\r\nWas able to reproduce in safe mode\r\n"},"comment":{"url":"https://api.github.com/repos/atom/autocomplete-plus/issues/comments/380184597","html_url":"https://github.com/atom/autocomplete-plus/issues/956#issuecomment-380184597","issue_url":"https://api.github.com/repos/atom/autocomplete-plus/issues/956","id":380184597,"user":{"login":"serialhex","id":500833,"avatar_url":"https://avatars2.githubusercontent.com/u/500833?v=4","gravatar_id":"","url":"https://api.github.com/users/serialhex","html_url":"https://github.com/serialhex","followers_url":"https://api.github.com/users/serialhex/followers","following_url":"https://api.github.com/users/serialhex/following{/other_user}","gists_url":"https://api.github.com/users/serialhex/gists{/gist_id}","starred_url":"https://api.github.com/users/serialhex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serialhex/subscriptions","organizations_url":"https://api.github.com/users/serialhex/orgs","repos_url":"https://api.github.com/users/serialhex/repos","events_url":"https://api.github.com/users/serialhex/events{/privacy}","received_events_url":"https://api.github.com/users/serialhex/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T17:33:53Z","updated_at":"2018-04-10T17:33:53Z","author_association":"NONE","body":"I have the same issue Atom 1.25.1 & autocomplete-plus 2.40.2.  Having `_` in my Non Word Characters list makes it explode for *any* kind of file I use (VBS is most recent, and it may not happen for Plain Text, but any code)."}}
{"actor":{"display_login":"serialhex"}}