aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2005-11-09 12:11:43 +0000
committernyamatongwe <devnull@localhost>2005-11-09 12:11:43 +0000
commitf6aff0a47a21212903ad86337b1e9eb52aef571d (patch)
treec60b50aab2db215503b64e655f47270a3a9428c6 /src
parent740d35f48cd7db8ebaed67df09d6604def4825b9 (diff)
downloadscintilla-mirror-f6aff0a47a21212903ad86337b1e9eb52aef571d.tar.gz
Patch, mostly from Simon Steele, that converts new lines in
pasted text to match document.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx9
-rw-r--r--src/Editor.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index bf94fb8ed..85212aa80 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -424,6 +424,8 @@ Editor::Editor() {
wrapVisualStartIndent = 0;
actualWrapVisualStartIndent = 0;
+ convertPastes = true;
+
hsStart = -1;
hsEnd = -1;
@@ -7241,6 +7243,13 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
InvalidateStyleRedraw();
break;
+ case SCI_SETPASTECONVERTENDINGS:
+ convertPastes = wParam != 0;
+ break;
+
+ case SCI_GETPASTECONVERTENDINGS:
+ return convertPastes ? 1 : 0;
+
default:
return DefWndProc(iMessage, wParam, lParam);
}
diff --git a/src/Editor.h b/src/Editor.h
index 0db5cb1c3..6d2cbbdef 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -312,6 +312,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
int wrapVisualStartIndent;
int actualWrapVisualStartIndent;
+ bool convertPastes;
+
Document *pdoc;
Editor();