summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp
index 330a3d14ed..dbc58e0519 100644
--- a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp
+++ b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp
@@ -383,6 +383,7 @@ void SpreadsheetWidget::try_generate_tip_for_input_expression(StringView source,
m_inline_documentation_window->hide();
return;
}
+ cursor_offset = min(cursor_offset, source.length());
auto maybe_function_and_argument = get_function_and_argument_index(source.substring_view(0, cursor_offset));
if (!maybe_function_and_argument.has_value()) {
m_inline_documentation_window->hide();