diff options
| author | nyamatongwe <unknown> | 2011-09-09 16:59:38 +1000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2011-09-09 16:59:38 +1000 | 
| commit | c4e2263b026a0b5aa67c421b767c3ebbabda654f (patch) | |
| tree | a81b91816ba7a5b16ad676ba3a2776e99a3316af /src | |
| parent | 9f1e13f587c8c3221a99cd2beee90242c32862fc (diff) | |
| parent | 9b4a855ed7962ce5da8c3e538a38f3eb396a8cc7 (diff) | |
| download | scintilla-mirror-c4e2263b026a0b5aa67c421b767c3ebbabda654f.tar.gz | |
Merge with main repository.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Decoration.cxx | 4 | ||||
| -rw-r--r-- | src/Document.cxx | 6 | ||||
| -rw-r--r-- | src/Editor.cxx | 8 | 
3 files changed, 11 insertions, 7 deletions
| diff --git a/src/Decoration.cxx b/src/Decoration.cxx index 90bde57f2..24632d7c1 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -126,9 +126,13 @@ bool DecorationList::FillRange(int &position, int value, int &fillLength) {  }  void DecorationList::InsertSpace(int position, int insertLength) { +	const bool atEnd = position == lengthDocument;  	lengthDocument += insertLength;  	for (Decoration *deco=root; deco; deco = deco->next) {  		deco->rs.InsertSpace(position, insertLength); +		if (atEnd) { +			deco->rs.FillRange(position, 0, insertLength); +		}  	}  } diff --git a/src/Document.cxx b/src/Document.cxx index 2729d3d7b..5c05aa5e0 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -87,10 +87,10 @@ void LexInterface::Colourise(int start, int end) {  Document::Document() {  	refCount = 0; -#ifdef __unix__ -	eolMode = SC_EOL_LF; -#else +#ifdef _WIN32  	eolMode = SC_EOL_CRLF; +#else +	eolMode = SC_EOL_LF;  #endif  	dbcsCodePage = 0;  	stylingBits = 5; diff --git a/src/Editor.cxx b/src/Editor.cxx index 74698a13d..1257ac4b0 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6051,20 +6051,20 @@ bool Editor::PositionInSelection(int pos) {  bool Editor::PointInSelection(Point pt) {  	SelectionPosition pos = SPositionFromLocation(pt, false, true); -	int xPos = XFromPosition(pos); +	Point ptPos = LocationFromPosition(pos);  	for (size_t r=0; r<sel.Count(); r++) {  		SelectionRange range = sel.Range(r);  		if (range.Contains(pos)) {  			bool hit = true;  			if (pos == range.Start()) {  				// see if just before selection -				if (pt.x < xPos) { +				if (pt.x < ptPos.x) {  					hit = false;  				}  			}  			if (pos == range.End()) {  				// see if just after selection -				if (pt.x > xPos) { +				if (pt.x > ptPos.x) {  					hit = false;  				}  			} @@ -8423,7 +8423,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		return vs.caretStyle;  	case SCI_SETCARETWIDTH: -		if (wParam <= 0) +		if (static_cast<int>(wParam) <= 0)  			vs.caretWidth = 0;  		else if (wParam >= 3)  			vs.caretWidth = 3; | 
