mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 05:25:09 +00:00
HackStudio+LibGUI: Handle #include quotes and brackets in the engine
Previously we had a special case in order to auto-append quotes or angle brackets to #include statements. After the previous commit this is no longer necessary.
This commit is contained in:
parent
a5b3c3f85f
commit
f699dbdc3f
2 changed files with 4 additions and 13 deletions
|
@ -670,7 +670,8 @@ Optional<Vector<GUI::AutocompleteProvider::Entry>> CppComprehensionEngine::try_a
|
|||
if (!(path.ends_with(".h") || Core::File::is_directory(LexicalPath::join(full_dir, path).string())))
|
||||
continue;
|
||||
if (path.starts_with(partial_basename)) {
|
||||
options.append({ path, partial_basename.length(), include_type, GUI::AutocompleteProvider::Language::Cpp });
|
||||
auto completion = include_type == GUI::AutocompleteProvider::CompletionKind::ProjectInclude ? String::formatted("<{}>", path) : String::formatted("\"{}\"", path);
|
||||
options.append({ completion, partial_basename.length() + 1, include_type, GUI::AutocompleteProvider::Language::Cpp, path });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue