diff options
| author | nyamatongwe <unknown> | 2010-03-06 09:50:03 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2010-03-06 09:50:03 +0000 | 
| commit | 97417a54da63c3a8e8921bbba52fb3adf725a9fc (patch) | |
| tree | a22bbbeb3e4d770f856c9a963eec5e120dbdcebb /src | |
| parent | e9f0cabc41a76a1e8ed9716c0b5e36f8a16278ec (diff) | |
| download | scintilla-mirror-97417a54da63c3a8e8921bbba52fb3adf725a9fc.tar.gz | |
Optimized setting wrap attributes by only calling ReconfigureScrollBars if
the attribute has changed value since ReconfigureScrollBars is unexpectedly
slow on GTK+.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 24 | 
1 files changed, 15 insertions, 9 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index d25099c1a..7afd3e563 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7142,9 +7142,11 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		return wrapState;  	case SCI_SETWRAPVISUALFLAGS: -		wrapVisualFlags = wParam; -		InvalidateStyleRedraw(); -		ReconfigureScrollBars(); +		if (wrapVisualFlags != static_cast<int>(wParam)) { +			wrapVisualFlags = wParam; +			InvalidateStyleRedraw(); +			ReconfigureScrollBars(); +		}  		break;  	case SCI_GETWRAPVISUALFLAGS: @@ -7159,18 +7161,22 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		return wrapVisualFlagsLocation;  	case SCI_SETWRAPSTARTINDENT: -		wrapVisualStartIndent = wParam; -		InvalidateStyleRedraw(); -		ReconfigureScrollBars(); +		if (wrapVisualStartIndent != static_cast<int>(wParam)) { +			wrapVisualStartIndent = wParam; +			InvalidateStyleRedraw(); +			ReconfigureScrollBars(); +		}  		break;  	case SCI_GETWRAPSTARTINDENT:  		return wrapVisualStartIndent;  	case SCI_SETWRAPINDENTMODE: -		wrapIndentMode = wParam; -		InvalidateStyleRedraw(); -		ReconfigureScrollBars(); +		if (wrapIndentMode != static_cast<int>(wParam)) { +			wrapIndentMode = wParam; +			InvalidateStyleRedraw(); +			ReconfigureScrollBars(); +		}  		break;  	case SCI_GETWRAPINDENTMODE: | 
