summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Spreadsheet/Cell.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Applications/Spreadsheet/Cell.cpp b/Userland/Applications/Spreadsheet/Cell.cpp
index 176887eb3b..9a1a4816c2 100644
--- a/Userland/Applications/Spreadsheet/Cell.cpp
+++ b/Userland/Applications/Spreadsheet/Cell.cpp
@@ -13,6 +13,12 @@ namespace Spreadsheet {
void Cell::set_data(String new_data)
{
+ // If we are a formula, we do not save the beginning '=', if the new_data is "" we can simply change our kind
+ if (m_kind == Formula && m_data.is_empty() && new_data.is_empty()) {
+ m_kind = LiteralString;
+ return;
+ }
+
if (m_data == new_data)
return;