Bug in version 11.0.3.1770: Editor and EM_SETSEL

Starina

Member³
Hi,

I use PL/SQL developer 11.0.3 and my plugin rrProject.

The next code does not work correctly:

SendMessage(IDE_GetEditorHandle, EM_SETSEL, 100, 5);
 
No text selected.

Try to execute the simple code with component TMemo (some text must be filled). 95 characters will be selected.

SendMessage(Memo1.Handle, EM_SETSEL, 100, 5);
 
It turned out that the first parameter (nStart) must be smaller than the second parameter (nEnd). Instead of (Handle, EM_SETSEL, 100, 5) you would need to pass (Handle, EM_SETSEL, 5, 100).
 
These two commands are not equivalent. For the first command (5, 100) cursor position has the fifth character. For the second (100, 5) cursor position has the hundredth character. Approval 'nStart < nEnd' is not true. Standard editor (TMemo) works fine. The editor of PLSQL Developer works bad.

This is error, it should be fixed.
 
Back
Top