diff options
| author | nyamatongwe <devnull@localhost> | 2001-02-06 02:16:11 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2001-02-06 02:16:11 +0000 | 
| commit | 892ee150a61229998b6bd3e3e495796f899f3025 (patch) | |
| tree | d776419273883b6292745c8ce829638f827d7766 /src | |
| parent | c4a930a94d853bcf4e6eb5dc16c7335d4ef9bde7 (diff) | |
| download | scintilla-mirror-892ee150a61229998b6bd3e3e495796f899f3025.tar.gz | |
Made SCI_CANPASTE and EM_CANPASTE work correctly using
IsClipboardFormatAvailable on Windows.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 6 | ||||
| -rw-r--r-- | src/Editor.h | 1 | 
2 files changed, 6 insertions, 1 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index c638ca5b3..67d8ea856 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1643,6 +1643,10 @@ void Editor::PasteRectangular(int pos, const char *ptr, int len) {  	SetEmptySelection(insertPos);  } +bool Editor::CanPaste() { +	return !pdoc->IsReadOnly(); +} +  void Editor::Clear() {  	if (currentPos == anchor) {  		DelChar(); @@ -3525,7 +3529,7 @@ long Editor::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) {  	case EM_CANPASTE:  	case SCI_CANPASTE: -		return !pdoc->IsReadOnly(); +		return CanPaste();  	case EM_CHARFROMPOS: {  			if (lParam == 0) diff --git a/src/Editor.h b/src/Editor.h index 0a37c8b8f..4e1ffc782 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -221,6 +221,7 @@ protected:	// ScintillaBase subclass needs access to much of Editor  	void Cut();  	void PasteRectangular(int pos, const char *ptr, int len);  	virtual void Copy() = 0; +	virtual bool CanPaste();  	virtual void Paste() = 0;  	void Clear();  	void SelectAll(); | 
