Skip to content

Commit

Permalink
fixed: editor flickers after foramtter execution
Browse files Browse the repository at this point in the history
  • Loading branch information
eranif committed Mar 22, 2024
1 parent 6ce0ade commit 5b95d78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CodeFormatter/codeformatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ void CodeFormatter::OnFormatCompleted(clSourceFormatEvent& event)
auto editor = clGetManager()->FindEditor(filepath);

if (editor) {
wxWindowUpdateLocker window_locker{ editor->GetCtrl() };
wxWindowUpdateLocker window_locker{ editor->GetCtrl()->GetParent() };
editor->GetCtrl()->BeginUndoAction();
clEditorStateLocker locker{ editor->GetCtrl() };
editor->GetCtrl()->SetText(event.GetFormattedString());
Expand Down
2 changes: 1 addition & 1 deletion LiteEditor/cl_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6115,7 +6115,7 @@ void clEditor::OpenURL(wxCommandEvent& event)

void clEditor::ReloadFromDisk(bool keepUndoHistory)
{
wxWindowUpdateLocker locker(this);
wxWindowUpdateLocker locker(GetParent());
SetReloadingFile(true);

DoCancelCalltip();
Expand Down

0 comments on commit 5b95d78

Please sign in to comment.