fix(shell/server): also invalidate non-open files
This commit is contained in:
parent
5e94f63b3e
commit
52bcfb713f
1 changed files with 3 additions and 1 deletions
|
|
@ -416,13 +416,15 @@ server::cmd_res server::handle_sync(server::cmd_req const & req) {
|
|||
|
||||
auto mtime = time(nullptr);
|
||||
|
||||
bool needs_invalidation = !m_open_files.count(new_file_name);
|
||||
bool needs_invalidation = true;
|
||||
|
||||
auto & ef = m_open_files[new_file_name];
|
||||
if (ef.m_content != new_content) {
|
||||
ef.m_content = new_content;
|
||||
ef.m_mtime = mtime;
|
||||
needs_invalidation = true;
|
||||
} else {
|
||||
needs_invalidation = false;
|
||||
}
|
||||
|
||||
json res;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue