From 1bc9aa3919af4debbd8dc94edf63a9277744c228 Mon Sep 17 00:00:00 2001 From: David Shuman Date: Fri, 31 Jan 2020 11:23:01 +1100 Subject: Feature [feature-requests:#1336] Add default argument for GetRelative. --- doc/ScintillaHistory.html | 5 +++++ 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 @@ Andreas Falkenhahn Mark Reay + David Shuman

@@ -568,6 +569,10 @@ Released 16 January 2020.

  • + Add default argument for StyleContext::GetRelative. + Feature #1336. +
  • +
  • Fix drag and drop between different encodings by always providing CF_UNICODETEXT only. Bug #2151.
  • 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(styler.SafeGetCharAt(currentPos+n, 0)); + int GetRelative(Sci_Position n, char chDefault='\0') { + return static_cast(styler.SafeGetCharAt(currentPos+n, chDefault)); } int GetRelativeCharacter(Sci_Position n) { if (n == 0) -- cgit v1.2.3