diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 15 | ||||
| -rw-r--r-- | src/Editor.h | 1 | 
2 files changed, 16 insertions, 0 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index 9211335df..5eb384bb2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5572,6 +5572,18 @@ int Editor::CodePage() const {  		return 0;  } +int Editor::WrapCount(int line) { +	AutoSurface surface(this); +	AutoLineLayout ll(llc, RetrieveLineLayout(line)); + +	if (surface && ll) { +		LayoutLine(line, surface, vs, ll, wrapWidth); +		return ll->lines; +	} else { +		return 1; +	} +} +  static bool ValidMargin(unsigned long wParam) {  	return wParam < ViewStyle::margins;  } @@ -6642,6 +6654,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  	case SCI_DOCLINEFROMVISIBLE:  		return cs.DocFromDisplay(wParam); +	case SCI_WRAPCOUNT: +		return WrapCount(wParam); +  	case SCI_SETFOLDLEVEL: {  			int prev = pdoc->SetLevel(wParam, lParam);  			if (prev != lParam) diff --git a/src/Editor.h b/src/Editor.h index bace500bd..76e79e7e7 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -516,6 +516,7 @@ protected:	// ScintillaBase subclass needs access to much of Editor  	void GetHotSpotRange(int& hsStart, int& hsEnd);  	int CodePage() const; +	int WrapCount(int line);  	virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) = 0; | 
