diff options
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 4df7c9247..9f50e331d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5330,7 +5330,7 @@ void Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) { strncat(textWithEndl, "\r", textLen); if (pdoc->eolMode != SC_EOL_CR) strncat(textWithEndl, "\n", textLen); - ss->Set(textWithEndl, strlen(textWithEndl), + ss->Set(textWithEndl, strlen(textWithEndl) + 1, pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false, true); delete []text; } @@ -6465,7 +6465,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { SelectionText selectedText; CopySelectionRange(&selectedText); if (lParam == 0) { - return selectedText.len + 1; + return selectedText.len ? selectedText.len : 1; } else { char *ptr = CharPtrFromSPtr(lParam); int iChar = 0; |