diff options
| author | Neil <nyamatongwe@gmail.com> | 2020-07-16 10:20:23 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2020-07-16 10:20:23 +1000 | 
| commit | 8c86b7a6de1048d4c86e07c44da27b0dba4d7572 (patch) | |
| tree | f6152138212f98b38237ddc19598498681eb9d42 /src/EditView.cxx | |
| parent | c2c917c1b04cbe1ad3bc61ca6a0d51d45b32c0d0 (diff) | |
| download | scintilla-mirror-8c86b7a6de1048d4c86e07c44da27b0dba4d7572.tar.gz | |
Make WrapMode an enum class for more type safety.
Diffstat (limited to 'src/EditView.cxx')
| -rw-r--r-- | src/EditView.cxx | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index fe137f2c8..5a59c102e 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -62,7 +62,7 @@ using namespace Scintilla;  PrintParameters::PrintParameters() noexcept {  	magnification = 0;  	colourMode = SC_PRINT_NORMAL; -	wrapState = eWrapWord; +	wrapState = WrapMode::word;  }  namespace Scintilla { @@ -578,12 +578,12 @@ void EditView::LayoutLine(const EditModel &model, Sci::Line line, Surface *surfa  					continue;  				}  				if (p > 0) { -					if (vstyle.wrapState == eWrapChar) { +					if (vstyle.wrapState == WrapMode::character) {  						lastGoodBreak = model.pdoc->MovePositionOutsideChar(p + posLineStart, -1)  							- posLineStart;  						p = model.pdoc->MovePositionOutsideChar(p + 1 + posLineStart, 1) - posLineStart;  						continue; -					} else if ((vstyle.wrapState == eWrapWord) && (ll->styles[p] != ll->styles[p - 1])) { +					} else if ((vstyle.wrapState == WrapMode::word) && (ll->styles[p] != ll->styles[p - 1])) {  						lastGoodBreak = p;  					} else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) {  						lastGoodBreak = p; @@ -2539,7 +2539,7 @@ Sci::Position EditView::FormatRange(bool draw, const Sci_RangeToFormat *pfr, Sur  	Sci::Position nPrintPos = pfr->chrg.cpMin;  	int visibleLine = 0;  	int widthPrint = pfr->rc.right - pfr->rc.left - vsPrint.fixedColumnWidth; -	if (printParameters.wrapState == eWrapNone) +	if (printParameters.wrapState == WrapMode::none)  		widthPrint = LineLayout::wrapWidthInfinite;  	while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) {  | 
