aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-04-03 12:52:41 +0000
committernyamatongwe <unknown>2002-04-03 12:52:41 +0000
commit6d23cab37a9ed86db5c240b6a2145b6a7078116b (patch)
treec34dc3308b8237df9e0b90d12c3b7d016b6a5eb7
parent8947805be9f56db782923bc07fb948524df95030 (diff)
downloadscintilla-mirror-6d23cab37a9ed86db5c240b6a2145b6a7078116b.tar.gz
In read-only mode, display no-effect drag & drop cursor.
-rw-r--r--win32/ScintillaWin.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 875c0252c..b5db2a3ae 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1002,8 +1002,9 @@ void ScintillaWin::Paste() {
if (isRectangular) {
PasteRectangular(selStart, putf, len);
} else {
- pdoc->InsertString(currentPos, putf, len);
- SetEmptySelection(currentPos + len);
+ if (pdoc->InsertString(currentPos, putf, len)) {
+ SetEmptySelection(currentPos + len);
+ }
}
delete []putf;
}
@@ -1639,7 +1640,7 @@ STDMETHODIMP ScintillaWin::DragEnter(LPDATAOBJECT pIDataSource, DWORD grfKeyStat
}
STDMETHODIMP ScintillaWin::DragOver(DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) {
- if (!hasOKText) {
+ if (!hasOKText || pdoc->IsReadOnly()) {
*pdwEffect = DROPEFFECT_NONE;
return S_OK;
}