summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio/Editor.cpp
diff options
context:
space:
mode:
authorluiz <luizgfc@algartelecom.com.br>2021-08-14 20:03:37 -0300
committerAndreas Kling <kling@serenityos.org>2021-09-04 21:04:33 +0200
commit964249a5b01792b080ba328856e0724b85065914 (patch)
treeec6662be1dc2511f3cd138e947581d0fb73f3f1a /Userland/DevTools/HackStudio/Editor.cpp
parent83c412ee9efa85a6949960b196327530862a0706 (diff)
downloadserenity-964249a5b01792b080ba328856e0724b85065914.zip
LibGUI: Fixes modified indicator behavior after saving
Pior to this change when the user added text after having saved the file the Text Editor wouldn't enable the modified flag, unless this new text was a new line. This happened because the UndoStack was merging the Command added by the new text with the old text one, and when is_current_modified() was called, the m_stack_index would not have been incremented, and it would return false. In this change was added a condition to verify if the modified tag is active, and the merge is only done if the document is already modified.
Diffstat (limited to 'Userland/DevTools/HackStudio/Editor.cpp')
0 files changed, 0 insertions, 0 deletions