diff options
author | nyamatongwe <unknown> | 2004-05-11 13:31:02 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2004-05-11 13:31:02 +0000 |
commit | c71c1f0039a2d9333f6ea5548ba8e48f89f6101c (patch) | |
tree | 34443907ffade9fc3c6ce4311c9184395b01ff18 /src/Editor.cxx | |
parent | 6274bce67c1b422a912087dbcb6e42088b685f69 (diff) | |
download | scintilla-mirror-c71c1f0039a2d9333f6ea5548ba8e48f89f6101c.tar.gz |
Modifications to selection handling to make copying and
pasting from/to various encodings work.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 4b1c6691d..7bafb3fff 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4631,7 +4631,8 @@ char *Editor::CopyRange(int start, int end) { } void Editor::CopySelectionFromRange(SelectionText *ss, int start, int end) { - ss->Set(CopyRange(start, end), end - start + 1, pdoc->dbcsCodePage, false); + ss->Set(CopyRange(start, end), end - start + 1, + pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); } void Editor::CopySelectionRange(SelectionText *ss) { @@ -4673,7 +4674,8 @@ void Editor::CopySelectionRange(SelectionText *ss) { text[size] = '\0'; } } - ss->Set(text, size + 1, pdoc->dbcsCodePage, selType == selRectangle); + ss->Set(text, size + 1, pdoc->dbcsCodePage, + vs.styles[STYLE_DEFAULT].characterSet, selType == selRectangle); } } @@ -4681,13 +4683,15 @@ void Editor::CopyRangeToClipboard(int start, int end) { start = pdoc->ClampPositionIntoDocument(start); end = pdoc->ClampPositionIntoDocument(end); SelectionText selectedText; - selectedText.Set(CopyRange(start, end), end - start + 1, pdoc->dbcsCodePage); + selectedText.Set(CopyRange(start, end), end - start + 1, + pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); CopyToClipboard(selectedText); } void Editor::CopyText(int length, const char *text) { SelectionText selectedText; - selectedText.Copy(text, length, pdoc->dbcsCodePage); + selectedText.Copy(text, length, + pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); CopyToClipboard(selectedText); } @@ -5161,7 +5165,7 @@ void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) { } else { SetEmptySelection(newPos); } - drag.Set(0, 0, 0); + drag.Free(); } selectionType = selChar; } |