diff options
| author | Neil <nyamatongwe@gmail.com> | 2014-12-07 10:22:43 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2014-12-07 10:22:43 +1100 | 
| commit | b24b40480828df8ab7c47f36112e8ba51046ce69 (patch) | |
| tree | 1de8012d423309ce093c6d345d29c12fcfb2ab54 /src | |
| parent | 52555d3fcea8c87720878f18969c87fca304f981 (diff) | |
| download | scintilla-mirror-b24b40480828df8ab7c47f36112e8ba51046ce69.tar.gz | |
Protect FineTickerCancel from being called when fine tickers not implemented.
Use ShowCaretAtCurrentPosition which understands focus in preference to
DropCaret where possible.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index b85055202..0fba257be 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1333,7 +1333,9 @@ void Editor::ShowCaretAtCurrentPosition() {  void Editor::DropCaret() {  	caret.active = false; -	FineTickerCancel(tickCaret); +	if (FineTickerAvailable()) { +		FineTickerCancel(tickCaret); +	}  	InvalidateCaret();  } @@ -3290,7 +3292,6 @@ int Editor::KeyCommand(unsigned int iMessage) {  		break;  	case SCI_EDITTOGGLEOVERTYPE:  		inOverstrike = !inOverstrike; -		DropCaret();  		ShowCaretAtCurrentPosition();  		ContainerNeedsUpdate(SC_UPDATE_CONTENT);  		NotifyUpdateUI(); @@ -4678,12 +4679,10 @@ void Editor::FineTickerCancel(TickReason) {  void Editor::SetFocusState(bool focusState) {  	hasFocus = focusState;  	NotifyFocus(hasFocus); -	if (hasFocus) { -		ShowCaretAtCurrentPosition(); -	} else { +	if (!hasFocus) {  		CancelModes(); -		DropCaret();  	} +	ShowCaretAtCurrentPosition();  }  int Editor::PositionAfterArea(PRectangle rcArea) const { | 
