From 35fce59f65c02414af6cf0fcdc698c61ae0f8b47 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 18 Feb 2018 10:41:51 -0500 Subject: Backported bugfixes and changes from Scintilla 4.0.2 to 4.0.3. --- src/scintilla_backports/6434_ed27432729c3.patch | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/scintilla_backports/6434_ed27432729c3.patch (limited to 'src/scintilla_backports/6434_ed27432729c3.patch') diff --git a/src/scintilla_backports/6434_ed27432729c3.patch b/src/scintilla_backports/6434_ed27432729c3.patch new file mode 100644 index 00000000..fafca810 --- /dev/null +++ b/src/scintilla_backports/6434_ed27432729c3.patch @@ -0,0 +1,50 @@ +# HG changeset patch +# User Neil +# Date 1517090168 -39600 +# Node ID ed27432729c386c48ef4f11459aeb2ed1f0856c8 +# Parent 231ac99e1fdc2b0fa62668cf5495b2f7df3f4d82 +Use std::abs in preference to abs as std::abs is generic and abs casts to int +which may drop information. + +diff -r 231ac99e1fdc -r ed27432729c3 src/Document.cxx +--- a/src/Document.cxx Sun Jan 28 08:32:17 2018 +1100 ++++ b/src/Document.cxx Sun Jan 28 08:56:08 2018 +1100 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -877,7 +878,7 @@ + const Sci::Position posNext = NextPosition(pos, increment); + if (posNext == pos) + return INVALID_POSITION; +- if (abs(pos-posNext) > 3) // 4 byte character = 2*UTF16. ++ if (std::abs(pos-posNext) > 3) // 4 byte character = 2*UTF16. + characterOffset -= increment; + pos = posNext; + characterOffset -= increment; +diff -r 231ac99e1fdc -r ed27432729c3 src/Editor.cxx +--- a/src/Editor.cxx Sun Jan 28 08:32:17 2018 +1100 ++++ b/src/Editor.cxx Sun Jan 28 08:56:08 2018 +1100 +@@ -11,8 +11,8 @@ + #include + #include + #include +- + #include ++ + #include + #include + #include +@@ -934,7 +934,7 @@ + // Try to optimise small scrolls + #ifndef UNDER_CE + const Sci::Line linesToMove = topLine - topLineNew; +- const bool performBlit = (abs(linesToMove) <= 10) && (paintState == notPainting); ++ const bool performBlit = (std::abs(linesToMove) <= 10) && (paintState == notPainting); + willRedrawAll = !performBlit; + #endif + SetTopLine(topLineNew); -- cgit v1.2.3