commit 661f09c6a7f435862901308629d4018302244461
parent 71720ba6dd812abc162006a390338f924d39b5b2
Author: cfillion <cfillion@users.noreply.github.com>
Date: Sat, 20 Aug 2016 19:51:07 -0700
richedit: stop moving the caret to the end of the document on windows
Diffstat:
1 file changed, 0 insertions(+), 8 deletions(-)
diff --git a/src/richedit.cpp b/src/richedit.cpp
@@ -95,14 +95,6 @@ bool RichEdit::setRichText(const string &rtf)
if(!length)
return false;
- // move caret to the end
- CHARRANGE cr{length, length};
- SendMessage(handle(), EM_EXSETSEL, 0, (LPARAM)&cr);
-
- // scroll back to top
- LONG lines = (LONG)SendMessage(handle(), EM_GETLINECOUNT, 0, 0);
- SendMessage(handle(), EM_LINESCROLL, 0, -lines);
-
// scale down a little bit, by default everything is way to big
SendMessage(handle(), EM_SETZOOM, 3, 4);