From a289dff4088646beb6ef16afedfa59768c718a90 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 25 Nov 2016 17:03:10 +1100 Subject: Bug [#1886]. Fix EM_SETSEL to match Microsoft documentation. --- doc/ScintillaHistory.html | 4 ++++ win32/ScintillaWin.cxx | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 876587a62..adadc7a4e 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -590,6 +590,10 @@ Bug #1881.
  • + On Win32 fix EM_SETSEL to match Microsoft documentation.. + Bug #1886. +
  • +
  • SciTE on Windows restores focus to edit pane after closing user strip.
  • diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index e20eb1d76..9cf900fb3 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1669,11 +1669,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam if (nStart == -1) { nStart = nEnd; // Remove selection } - if (nStart > nEnd) { - SetSelection(nEnd, nStart); - } else { - SetSelection(nStart, nEnd); - } + SetSelection(nEnd, nStart); EnsureCaretVisible(); } break; -- cgit v1.2.3