From 9ef2675c364f729add6ea0db1e7d906ec1a2ce28 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 15 Jul 2009 07:19:22 +0000 Subject: Fixed bug where wrong length was returned for SCI_GETSELTEXT with NULL lParam when there are multiple selections. --- src/Editor.cxx | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 71c8965fb..17076a373 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6441,33 +6441,21 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { break; case SCI_GETSELTEXT: { - if (lParam == 0) { - if (sel.selType == Selection::selStream) { - return 1 + SelectionEnd().Position() - SelectionStart().Position(); - } else { - // TODO: why is selLines handled the slow way? - int size = 0; - int extraCharsPerLine = 0; - if (sel.selType != Selection::selLines) - extraCharsPerLine = (pdoc->eolMode == SC_EOL_CRLF) ? 2 : 1; - for (size_t r=0; r