diff options
| -rw-r--r-- | include/Scintilla.h | 4 | ||||
| -rw-r--r-- | include/Scintilla.iface | 6 | ||||
| -rw-r--r-- | src/Editor.cxx | 16 | ||||
| -rw-r--r-- | src/Editor.h | 2 | 
4 files changed, 14 insertions, 14 deletions
| diff --git a/include/Scintilla.h b/include/Scintilla.h index ad6837cb2..fbaa46516 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -505,8 +505,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,  #define CARET_EVEN 0x08  #define SCI_SETXCARETPOLICY 2402  #define SCI_SETYCARETPOLICY 2403 -#define SCI_SETPRINTWRAPS 2406 -#define SCI_GETPRINTWRAPS 2407 +#define SCI_SETPRINTWRAPMODE 2406 +#define SCI_GETPRINTWRAPMODE 2407  #define SCI_STARTRECORD 3001  #define SCI_STOPRECORD 3002  #define SCI_SETLEXER 4001 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index a1c785452..7775cebab 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1363,11 +1363,11 @@ fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop)  # The exclusion zone is given in lines.  fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop) -# Set printing to line wrapped (true) or not line wrapped. -set void SetPrintWraps=2406(bool wraps,) +# Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). +set void SetPrintWrapMode=2406(int mode,)  # Is printing line wrapped. -get bool GetPrintWraps=2407(,) +get int GetPrintWrapMode=2407(,)  # Start notifying the container of all key presses and commands.  fun void StartRecord=3001(,) diff --git a/src/Editor.cxx b/src/Editor.cxx index 9f10e3894..01c850176 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -285,7 +285,7 @@ Editor::Editor() {  	printMagnification = 0;  	printColourMode = SC_PRINT_NORMAL; -	printWraps = true; +	printWrapState = eWrapWord;  	cursorMode = SC_CURSORNORMAL;  	controlCharSymbol = 0;	/* Draw the control characters */ @@ -2442,7 +2442,7 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) {  	int nPrintPos = pfr->chrg.cpMin;  	int visibleLine = 0;  	int widthPrint = pfr->rc.Width() - lineNumberWidth; -	if (!printWraps) +	if (printWrapState == eWrapNone)  		widthPrint = LineLayout::wrapWidthInfinite;  	while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) { @@ -2484,7 +2484,7 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) {  			}  		} -		if (draw && lineNumberWidth &&  +		if (draw && lineNumberWidth &&  			(ypos + vsPrint.lineHeight <= pfr->rc.bottom) &&  			(visibleLine >= 0)) {  			char number[100]; @@ -2517,7 +2517,7 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) {  				visibleLine++;  				if (iwl == ll.lines-1)  					nPrintPos = pdoc->LineStart(lineDoc + 1); -				else  +				else  					nPrintPos += ll.LineStart(iwl+1) - ll.LineStart(iwl);  			}  		} @@ -4965,12 +4965,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  	case SCI_GETPRINTCOLOURMODE:  		return printColourMode; -	case SCI_SETPRINTWRAPS: -		printWraps = wParam != 0; +	case SCI_SETPRINTWRAPMODE: +		printWrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone;  		break; -	case SCI_GETPRINTWRAPS: -		return printWraps; +	case SCI_GETPRINTWRAPMODE: +		return printWrapState;  	case SCI_GETSTYLEAT:  		if (static_cast<short>(wParam) >= pdoc->Length()) diff --git a/src/Editor.h b/src/Editor.h index 15995e7ea..714efc755 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -184,7 +184,7 @@ protected:	// ScintillaBase subclass needs access to much of Editor  	int printMagnification;  	int printColourMode; -	bool printWraps; +	int printWrapState;  	int cursorMode;  	int controlCharSymbol; | 
