mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
HackStudio: Fix "navigate to include"
This fixes an off-by-one error in the "navigate to include" feature of HackStudio.
This commit is contained in:
parent
9ae98bc81b
commit
43392c567e
1 changed files with 2 additions and 4 deletions
|
@ -565,11 +565,9 @@ void Editor::flush_file_content_to_langauge_server()
|
|||
|
||||
void Editor::on_navigatable_link_click(const GUI::TextDocumentSpan& span)
|
||||
{
|
||||
auto adjusted_range = span.range;
|
||||
adjusted_range.end().set_column(adjusted_range.end().column() + 1);
|
||||
auto span_text = document().text_in_range(adjusted_range);
|
||||
auto span_text = document().text_in_range(span.range);
|
||||
auto header_path = span_text.substring(1, span_text.length() - 2);
|
||||
dbgln_if(EDITOR_DEBUG, "Ctrl+click: {} \"{}\"", adjusted_range, header_path);
|
||||
dbgln_if(EDITOR_DEBUG, "Ctrl+click: {} \"{}\"", span.range, header_path);
|
||||
navigate_to_include_if_available(header_path);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue