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

@@ -576,6 +577,9 @@ Feature #1328.

  • + Add default argument for StyleContext::GetRelative. + Feature #1336. +
  • Don't clear clipboard before copying text with Qt. Bug #2147.
  • 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(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