Skip to content

Commit

Permalink
Merge pull request #119 from ahmetsait/focus-issue
Browse files Browse the repository at this point in the history
Fix #94: Other TextBox carets jumping around
  • Loading branch information
desjarlais authored May 9, 2024
2 parents f8ad716 + e544708 commit c810827
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Scintilla.NET/Scintilla.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3358,7 +3358,11 @@ public bool UseRightToLeftReadingLayout
exStyle &= ~WinApiHelpers.WS_EX_LAYOUTRTL;
}
Handle.SetWindowLongPtr(WinApiHelpers.GWL_EXSTYLE, new IntPtr(exStyle));
DirectMessage(NativeMethods.SCI_GRABFOCUS, new IntPtr(1)); // needs focus to update

// Workaround Scintilla mirrored rendering issue:
var wrapMode = WrapMode;
WrapMode = wrapMode == WrapMode.None ? WrapMode.Word : WrapMode.None;
WrapMode = wrapMode;
}
}

Expand Down

0 comments on commit c810827

Please sign in to comment.