diff options
| author | nyamatongwe <unknown> | 2004-07-15 13:56:16 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2004-07-15 13:56:16 +0000 | 
| commit | 840bc7cdb2c6494aaca1010e39ceec076ea7a827 (patch) | |
| tree | 127018883c39e90c4c44e5a21829f2021b71e30e | |
| parent | f22ba9303c663df2a2020062cf122627e82245f0 (diff) | |
| download | scintilla-mirror-840bc7cdb2c6494aaca1010e39ceec076ea7a827.tar.gz | |
Patch from Trent Mick to not treat the end of line characters as part
of the line for SCI_LINEENDWRAP and SCI_LINEENDWRAPEXTEND when in wrap
mode with visible end of line.
| -rw-r--r-- | src/Editor.cxx | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index fedc91f59..64f3da3a1 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4156,16 +4156,20 @@ int Editor::KeyCommand(unsigned int iMessage) {  		break;  	case SCI_LINEENDWRAP: {  			int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1); -			if (currentPos >= endPos) -				endPos = pdoc->LineEndPosition(currentPos); +			int realEndPos = pdoc->LineEndPosition(currentPos); +			if (endPos > realEndPos      // if moved past visible EOLs +				|| currentPos >= endPos) // if at end of display line already +				endPos = realEndPos;  			MovePositionTo(endPos);  			SetLastXChosen();  		}  		break;  	case SCI_LINEENDWRAPEXTEND: {  			int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1); -			if (currentPos >= endPos) -				endPos = pdoc->LineEndPosition(currentPos); +			int realEndPos = pdoc->LineEndPosition(currentPos); +			if (endPos > realEndPos      // if moved past visible EOLs +				|| currentPos >= endPos) // if at end of display line already +				endPos = realEndPos;  			MovePositionTo(endPos, selStream);  			SetLastXChosen();  		} | 
