diff options
| author | David Shuman <unknown> | 2020-01-31 11:23:01 +1100 |
|---|---|---|
| committer | David Shuman <unknown> | 2020-01-31 11:23:01 +1100 |
| commit | 51f6fc93610023ad50bec7c99d0f63f384ca9623 (patch) | |
| tree | 565c86e3768c4d26c9afe04eb5eca33a8f400044 | |
| parent | 38f3c4d8dfb7829f3c16cb1053484c0bade6ed85 (diff) | |
| download | scintilla-mirror-51f6fc93610023ad50bec7c99d0f63f384ca9623.tar.gz | |
Backport: Feature [feature-requests:#1336] Add default argument for GetRelative.
Backport of changeset 7968:914dde22b23f.
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | lexlib/StyleContext.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index c6ed95a5a..1c502ee53 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -543,6 +543,7 @@ </tr><tr> <td>Andreas Falkenhahn</td> <td>Mark Reay</td> + <td>David Shuman</td> </tr> </table> <p> @@ -576,6 +577,9 @@ <a href="https://sourceforge.net/p/scintilla/feature-requests/1328/">Feature #1328</a>. </li> <li> + Add default argument for StyleContext::GetRelative. + <a href="https://sourceforge.net/p/scintilla/feature-requests/1336/">Feature #1336</a>. + <li> Don't clear clipboard before copying text with Qt. <a href="https://sourceforge.net/p/scintilla/bugs/2147/">Bug #2147</a>. </li> diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h index 8cb683619..320a96652 100644 --- a/lexlib/StyleContext.h +++ b/lexlib/StyleContext.h @@ -154,8 +154,8 @@ public: Sci_Position LengthCurrent() const { return currentPos - styler.GetStartSegment(); } - int GetRelative(Sci_Position n) { - return static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+n, 0)); + int GetRelative(Sci_Position n, char chDefault='\0') { + return static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+n, chDefault)); } int GetRelativeCharacter(Sci_Position n) { if (n == 0) |
