diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index e7f90103a8..e055f1a31d 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -2936,7 +2936,7 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style) GetSelection(&startOld, &endOld); // but do we really have to change the selection? - bool changeSel = position != startOld || position != endOld; + const bool changeSel = position != startOld; if ( changeSel ) {