Selaa lähdekoodia

HackStudio: Remove adjustment of text range for documentation tooltip

We no longer need to adjust the hovered span's range to get the correct
hovered text. This fixes the "documentation tooltip" feature.
Itamar 2 vuotta sitten
vanhempi
commit
2046a670b3
1 muutettua tiedostoa jossa 2 lisäystä ja 5 poistoa
  1. 2 5
      Userland/DevTools/HackStudio/Editor.cpp

+ 2 - 5
Userland/DevTools/HackStudio/Editor.cpp

@@ -263,11 +263,8 @@ void Editor::mousemove_event(GUI::MouseEvent& event)
         }
 
         if (span.range.contains(text_position)) {
-            auto adjusted_range = span.range;
-            auto end_line_length = document().line(span.range.end().line()).length();
-            adjusted_range.end().set_column(min(end_line_length, adjusted_range.end().column() + 1));
-            auto hovered_span_text = document().text_in_range(adjusted_range);
-            dbgln_if(EDITOR_DEBUG, "Hovering: {} \"{}\"", adjusted_range, hovered_span_text);
+            auto hovered_span_text = document().text_in_range(span.range);
+            dbgln_if(EDITOR_DEBUG, "Hovering: {} \"{}\"", span.range, hovered_span_text);
 
             if (is_clickable) {
                 is_over_clickable = true;