diff options
| -rw-r--r-- | doc/ScintillaDoc.html | 14 | ||||
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | include/Scintilla.h | 1 | ||||
| -rw-r--r-- | include/Scintilla.iface | 1 | ||||
| -rw-r--r-- | src/EditView.cxx | 12 | 
5 files changed, 26 insertions, 6 deletions
| diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index aed82bbc0..8a8eddbff 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -119,7 +119,7 @@      <h1>Scintilla Documentation</h1> -    <p>Last edited 2 June 2018 NH</p> +    <p>Last edited 6 June 2018 NH</p>      <p>There is <a class="jump" href="Design.html">an overview of the internal design of      Scintilla</a>.<br /> @@ -6429,8 +6429,10 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){          <tr>            <td align="left"><code>SC_WRAPINDENT_FIXED</code></td>            <td align="center">0</td> -          <td>Wrapped sublines aligned to left of window plus amount set by -	  <a class="seealso" href="#SCI_SETWRAPSTARTINDENT">SCI_SETWRAPSTARTINDENT</a></td> +          <td> +              Wrapped sublines aligned to left of window plus amount set by +              <a class="seealso" href="#SCI_SETWRAPSTARTINDENT">SCI_SETWRAPSTARTINDENT</a> +          </td>          </tr>          <tr> @@ -6444,6 +6446,12 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){            <td align="center">2</td>            <td>Wrapped sublines are aligned to first subline indent plus one more level of indentation</td>          </tr> + +        <tr> +          <td align="left"><code>SC_WRAPINDENT_DEEPINDENT</code></td> +          <td align="center">3</td> +          <td>Wrapped sublines are aligned to first subline indent plus two more levels of indentation</td> +        </tr>        </tbody>      </table> diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index e903e8f3a..3e0db69be 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -529,6 +529,7 @@        </tr><tr>  	<td>Giuseppe Corbelli</td>  	<td>Andreas Rönnquist</td> +	<td>Henrik Hank</td>      </tr>      </table>      <p> @@ -561,6 +562,9 @@  	to fully transparent at top and bottom.  	</li>  	<li> +	Wrap indent mode SC_WRAPINDENT_DEEPINDENT added which indents two tabs from previous line. +	</li> +	<li>  	Indicators are drawn for line end characters when displayed.  	</li>  	<li> diff --git a/include/Scintilla.h b/include/Scintilla.h index 58f58f43f..db4524f12 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -548,6 +548,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,  #define SC_WRAPINDENT_FIXED 0  #define SC_WRAPINDENT_SAME 1  #define SC_WRAPINDENT_INDENT 2 +#define SC_WRAPINDENT_DEEPINDENT 3  #define SCI_SETWRAPINDENTMODE 2472  #define SCI_GETWRAPINDENTMODE 2473  #define SC_CACHE_NONE 0 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index ee23c4db2..8b08f4d2f 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1359,6 +1359,7 @@ enu WrapIndentMode=SC_WRAPINDENT_  val SC_WRAPINDENT_FIXED=0  val SC_WRAPINDENT_SAME=1  val SC_WRAPINDENT_INDENT=2 +val SC_WRAPINDENT_DEEPINDENT=3  # Sets how wrapped sublines are placed. Default is fixed.  set void SetWrapIndentMode=2472(int wrapIndentMode,) diff --git a/src/EditView.cxx b/src/EditView.cxx index 46eda5d3b..e09e55de9 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -521,10 +521,16 @@ void EditView::LayoutLine(const EditModel &model, Sci::Line line, Surface *surfa  				width -= static_cast<int>(vstyle.aveCharWidth); // take into account the space for end wrap mark  			}  			XYPOSITION wrapAddIndent = 0; // This will be added to initial indent of line -			if (vstyle.wrapIndentMode == SC_WRAPINDENT_INDENT) { -				wrapAddIndent = model.pdoc->IndentSize() * vstyle.spaceWidth; -			} else if (vstyle.wrapIndentMode == SC_WRAPINDENT_FIXED) { +			switch (vstyle.wrapIndentMode) { +			case SC_WRAPINDENT_FIXED:  				wrapAddIndent = vstyle.wrapVisualStartIndent * vstyle.aveCharWidth; +				break; +			case SC_WRAPINDENT_INDENT: +				wrapAddIndent = model.pdoc->IndentSize() * vstyle.spaceWidth; +				break; +			case SC_WRAPINDENT_DEEPINDENT: +				wrapAddIndent = model.pdoc->IndentSize() * 2 * vstyle.spaceWidth; +				break;  			}  			ll->wrapIndent = wrapAddIndent;  			if (vstyle.wrapIndentMode != SC_WRAPINDENT_FIXED) | 
