diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-09-25 15:37:18 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-09-25 15:41:25 +0200 |
| commit | 586a7defebd685dfc9f0ad251605389b5b4915e5 (patch) | |
| tree | f7f77b315bbffa6e1e570fe2d8165f1a31fd8eda | |
| parent | 54cc2066f73749f80e89a8220561406ab781c17f (diff) | |
| download | vis-lspc-586a7defebd685dfc9f0ad251605389b5b4915e5.tar.gz vis-lspc-586a7defebd685dfc9f0ad251605389b5b4915e5.zip | |
remove assertion that a closed file always has a path
When closing any open file we assume it has a baking path.
However, especially windows we opened to present markdown messages
to the user have no backing path, and thus closing them fail.
Fix this assumption and use vis' "[No Name]" if no file path is set.
| -rw-r--r-- | init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1169,7 +1169,7 @@ end -- close the file if associated with the language server local function lspc_close(ls, file) if not ls_is_file_opened(ls, file) then - return file.path .. ' not open in ' .. ls.name + return (file.path or '[No Name]') .. ' not open in ' .. ls.name end ls_send_notification(ls, 'textDocument/didClose', { textDocument = {uri = path_to_uri(file.path)}, |
