#1386 Add an API for getting the selection state

Feature_Request
closed-fixed
Neil Hodgson
Scintilla (788)
5
2013-01-17
2012-07-12
bazwal
No

The current documentaion suggests using SCI_GETSELECTIONSTART()-SCI_GETSELECTIONEND() in order to test whether there is any selected text.

But that method will not work for empty rectangular selections that extend over several lines.

AFAICS, the only reliable method for getting this information is to check the return value of SCI_GETSELTEXT(0,0) - but that seems a horribly inefficient way to do things.

I would therefore like to suggest adding a simple API (say SCI_SELECTIONISEMPTY) that just retrieves the return value of sel.Empty().

Discussion

  • Neil Hodgson
    Neil Hodgson
    2012-07-16

    Added SCI_GETSELECTIONEMPTY.

     
  • Neil Hodgson
    Neil Hodgson
    2012-07-16

    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-fixed
     
  • Neil Hodgson
    Neil Hodgson
    2013-01-17

    • status: open-fixed --> closed-fixed