diff options
| author | nyamatongwe <unknown> | 2000-11-30 23:15:11 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2000-11-30 23:15:11 +0000 | 
| commit | 6c12c420d846d28fd02bfb091d7b5cbe31ba08ef (patch) | |
| tree | d43b35ebfd556b6427c32d04f4aad3f715ed399a | |
| parent | 910f1811a05bb1e279cebd985ffe5dfc5536a3e1 (diff) | |
| download | scintilla-mirror-6c12c420d846d28fd02bfb091d7b5cbe31ba08ef.tar.gz | |
Patch from ActiveState for better clipboard handling.
| -rw-r--r-- | src/Editor.cxx | 11 | 
1 files changed, 8 insertions, 3 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index 68d41a59c..6c7bda2b2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1582,11 +1582,16 @@ void Editor::ClearDocumentStyle() {  }  void Editor::Cut() { -	Copy(); -	ClearSelection(); +	if (!pdoc->IsReadOnly()) { +		Copy(); +		ClearSelection(); +	}  }  void Editor::PasteRectangular(int pos, const char *ptr, int len) { +	if (pdoc->IsReadOnly()) { +		return; +	}  	currentPos = pos;  	int insertPos = currentPos;  	int xInsert = XFromPosition(currentPos); @@ -3478,7 +3483,7 @@ long Editor::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) {  	case EM_CANPASTE:  	case SCI_CANPASTE: -		return 1; +		return !pdoc->IsReadOnly();  	case EM_CHARFROMPOS: {  			if (lParam == 0) | 
