X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c598f225189ff925264117e4f8d6c70f699b72ab..7d1f4c3ff01b09105c07d5e176a14428c834975e:/src/common/textcmn.cpp diff --git a/src/common/textcmn.cpp b/src/common/textcmn.cpp index 6a494d434c..11c063dfdd 100644 --- a/src/common/textcmn.cpp +++ b/src/common/textcmn.cpp @@ -278,7 +278,7 @@ bool wxTextCtrlBase::CanPaste() const } // ---------------------------------------------------------------------------- -// misc +// selection and ranges // ---------------------------------------------------------------------------- void wxTextCtrlBase::SelectAll() @@ -291,6 +291,11 @@ wxString wxTextCtrlBase::GetStringSelection() const long from, to; GetSelection(&from, &to); + return GetRange(from, to); +} + +wxString wxTextCtrlBase::GetRange(long from, long to) const +{ wxString sel; if ( from < to ) {