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 | 1bc9aa3919af4debbd8dc94edf63a9277744c228 (patch) | |
tree | 103a709c59ab9bc76cd72f1b828ea09c9a7384eb | |
parent | 048e6c1815d8fbcc9e0ef0adb9482307c31d634a (diff) | |
download | scintilla-mirror-1bc9aa3919af4debbd8dc94edf63a9277744c228.tar.gz |
Feature [feature-requests:#1336] Add default argument for GetRelative.
-rw-r--r-- | doc/ScintillaHistory.html | 5 | ||||
-rw-r--r-- | lexlib/StyleContext.h | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 7ca70eeff..964947a12 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -549,6 +549,7 @@ </tr><tr> <td>Andreas Falkenhahn</td> <td>Mark Reay</td> + <td>David Shuman</td> </tr> </table> <p> @@ -568,6 +569,10 @@ Released 16 January 2020. </li> <li> + Add default argument for StyleContext::GetRelative. + <a href="https://sourceforge.net/p/scintilla/feature-requests/1336/">Feature #1336</a>. + </li> + <li> Fix drag and drop between different encodings by always providing CF_UNICODETEXT only. <a href="https://sourceforge.net/p/scintilla/bugs/2151/">Bug #2151</a>. </li> diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h index bc49197e4..96ef49d13 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) |