============================================================================= EditFixPositions()
| 4164 | // EditFixPositions() |
| 4165 | // |
| 4166 | void EditFixPositions ( HWND hwnd ) |
| 4167 | { |
| 4168 | int iMaxPos = ( int ) SendMessage ( hwnd, SCI_GETLENGTH, 0, 0 ); |
| 4169 | int iCurrentPos = ( int ) SendMessage ( hwnd, SCI_GETCURRENTPOS, 0, 0 ); |
| 4170 | int iAnchorPos = ( int ) SendMessage ( hwnd, SCI_GETANCHOR, 0, 0 ); |
| 4171 | if ( iCurrentPos > 0 && iCurrentPos < iMaxPos ) { |
| 4172 | int iNewPos = ( int ) SendMessage ( hwnd, SCI_POSITIONAFTER, ( WPARAM ) |
| 4173 | ( int ) SendMessage ( hwnd, SCI_POSITIONBEFORE, ( WPARAM ) iCurrentPos, 0 ), 0 ); |
| 4174 | if ( iNewPos != iCurrentPos ) { |
| 4175 | SendMessage ( hwnd, SCI_SETCURRENTPOS, ( WPARAM ) iNewPos, 0 ); |
| 4176 | iCurrentPos = iNewPos; |
| 4177 | } |
| 4178 | } |
| 4179 | if ( iAnchorPos != iCurrentPos && iAnchorPos > 0 && iAnchorPos < iMaxPos ) { |
| 4180 | int iNewPos = ( int ) SendMessage ( hwnd, SCI_POSITIONAFTER, ( WPARAM ) |
| 4181 | ( int ) SendMessage ( hwnd, SCI_POSITIONBEFORE, ( WPARAM ) iAnchorPos, 0 ), 0 ); |
| 4182 | if ( iNewPos != iAnchorPos ) { |
| 4183 | SendMessage ( hwnd, SCI_SETANCHOR, ( WPARAM ) iNewPos, 0 ); |
| 4184 | } |
| 4185 | } |
| 4186 | } |
| 4187 | |
| 4188 | |
| 4189 | //============================================================================= |
no outgoing calls
no test coverage detected