File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,12 @@ function Source:complete(params, callback)
123123 local line_ending = util .get_newline (bufnr )
124124 local line_ending_len = utf8len (line_ending )
125125 local editor_options = util .get_editor_options (bufnr )
126+ local buf_name = vim .api .nvim_buf_get_name (bufnr )
127+
128+ if buf_name == " " then
129+ callback (nil )
130+ return
131+ end
126132
127133 -- We need to calculate the number of bytes prior to the current character,
128134 -- that starts with all the prior lines
@@ -163,7 +169,7 @@ function Source:complete(params, callback)
163169 editor_language = filetype ,
164170 language = language ,
165171 cursor_position = { row = cursor .row - 1 , col = cursor .col - 1 },
166- absolute_uri = util .get_uri (vim . api . nvim_buf_get_name ( bufnr ) ),
172+ absolute_uri = util .get_uri (buf_name ),
167173 workspace_uri = util .get_uri (util .get_project_root ()),
168174 line_ending = line_ending ,
169175 cursor_offset = cursor_offset ,
You can’t perform that action at this time.
0 commit comments