Skip to content

Commit ff43028

Browse files
committed
bpp-lsp: bug fix: avoid re-parsing twice
1 parent 5381a19 commit ff43028

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lsp/ProgramPool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ std::shared_ptr<bpp::bpp_program> ProgramPool::re_parse_program(const std::strin
208208
return nullptr; // Return nullptr if parsing fails
209209
}
210210

211-
programs[index] = _parse_program(main_source_file);
211+
programs[index] = new_program;
212212
open_files[file_path] = true; // Mark the file as open
213213

214214
update_snapshot();
@@ -234,7 +234,7 @@ std::shared_ptr<bpp::bpp_program> ProgramPool::re_parse_program(
234234
return nullptr; // Return nullptr if parsing fails
235235
}
236236

237-
programs[index] = _parse_program(main_source_file, replacement_file_contents);
237+
programs[index] = new_program;
238238
open_files[file_path] = true; // Mark the file as open
239239

240240
update_snapshot();

0 commit comments

Comments
 (0)