diff options
| author | Steven Sojka <Steven.Sojka@tdameritrade.com> | 2020-08-25 07:11:29 -0500 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2020-08-25 14:35:08 +0200 |
| commit | 5d97cc5e09283ab67a12e3f49f1d610f154c04d3 (patch) | |
| tree | ff23812f07b1faa7e0c2c805fce333c6a5740203 /lua | |
| parent | feat(highlights): add ocaml (diff) | |
| download | nvim-treesitter-5d97cc5e09283ab67a12e3f49f1d610f154c04d3.tar nvim-treesitter-5d97cc5e09283ab67a12e3f49f1d610f154c04d3.tar.gz nvim-treesitter-5d97cc5e09283ab67a12e3f49f1d610f154c04d3.tar.bz2 nvim-treesitter-5d97cc5e09283ab67a12e3f49f1d610f154c04d3.tar.lz nvim-treesitter-5d97cc5e09283ab67a12e3f49f1d610f154c04d3.tar.xz nvim-treesitter-5d97cc5e09283ab67a12e3f49f1d610f154c04d3.tar.zst nvim-treesitter-5d97cc5e09283ab67a12e3f49f1d610f154c04d3.zip | |
fix(locals): add nil guard for definition id creation
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/locals.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/locals.lua b/lua/nvim-treesitter/locals.lua index 14ec47abb..368fd2024 100644 --- a/lua/nvim-treesitter/locals.lua +++ b/lua/nvim-treesitter/locals.lua @@ -31,7 +31,7 @@ end -- @returns a string id function M.get_definition_id(scope, node_text) -- Add a vaild starting character in case node text doesn't start with a valid one. - return table.concat({ 'k', node_text, scope:range() }, '_') + return table.concat({ 'k', node_text or '', scope:range() }, '_') end function M.get_definitions(bufnr) |
