diff options
author | Dmytro Meleshko <dmytro.meleshko@gmail.com> | 2021-11-24 13:37:48 +0200 |
---|---|---|
committer | Dmytro Meleshko <dmytro.meleshko@gmail.com> | 2021-11-24 13:37:48 +0200 |
commit | 41bda6cd48338a2df2b7baeeb53a987e4f803fbb (patch) | |
tree | 61761dd5f99809f54bfd38b06ad7cb2bdaef3141 /script/provider/provider.lua | |
parent | 1319f05cd4de50d7b01a297f39c4ad5a839ff7be (diff) | |
download | lua-language-server-41bda6cd48338a2df2b7baeeb53a987e4f803fbb.zip |
ensure that cachedRows of files are refreshed after didOpen
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r-- | script/provider/provider.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 8932c373..5ad07352 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -183,8 +183,11 @@ proto.on('textDocument/didChange', function (params) local changes = params.contentChanges local uri = doc.uri --log.debug('changes', util.dump(changes)) - local text = tm(uri, changes) + local text = files.getOriginText(uri) or '' + local rows = files.getCachedRows(uri) + text, rows = tm(text, rows, changes) files.setText(uri, text, true) + files.setCachedRows(uri, rows) end) proto.on('textDocument/hover', function (params) |