diff options
| author | nyamatongwe <unknown> | 2003-10-16 13:12:36 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2003-10-16 13:12:36 +0000 | 
| commit | a0b43abe46dca3ffd7fa1c6f75da97b3d614dce0 (patch) | |
| tree | 794989d63cbf02dda84ee5866b27c5563992c362 /src | |
| parent | f8b46f3fb8a382ef23cb32505d196ff64861f6f8 (diff) | |
| download | scintilla-mirror-a0b43abe46dca3ffd7fa1c6f75da97b3d614dce0.tar.gz | |
When multiple lines added, wrap all the added lines not just the top 2.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index c8efe0a6e..0a54ba2aa 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1410,8 +1410,9 @@ void Editor::NeedWrapping(int docLineStartWrapping, int docLineEndWrapping) {  			docLastLineToWrap = pdoc->LinesTotal();  	}  	// Wrap lines during idle. -	if (docLastLineToWrap != docLineLastWrapped) +	if (docLastLineToWrap != docLineLastWrapped) {  		SetIdle(true); +	}  }  // Check if wrapping needed and perform any needed wrapping. @@ -3408,7 +3409,7 @@ void Editor::CheckModificationForWrap(DocModification mh) {  		llc.Invalidate(LineLayout::llCheckTextAndStyle);  		if (wrapState != eWrapNone) {  			int lineDoc = pdoc->LineFromPosition(mh.position); -			if (mh.linesAdded == 0) { +			if (mh.linesAdded <= 0) {  				AutoSurface surface(this);  				AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc));  				if (surface && ll) { @@ -3417,11 +3418,9 @@ void Editor::CheckModificationForWrap(DocModification mh) {  						NeedWrapping(lineDoc - 1, lineDoc + 1);  						Redraw();  					} -				} else { -					NeedWrapping(lineDoc, lineDoc + 1);  				}  			} else { -				NeedWrapping(lineDoc, lineDoc + 1); +				NeedWrapping(lineDoc, lineDoc + 1 + mh.linesAdded);  			}  		}  	} | 
