From 1436d7b77f2e51485627d45eb015261eb8953a1b Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 9 Dec 2014 13:30:54 -0500 Subject: Updated to Scintilla 3.5.2. --- src/Makefile | 2 +- src/scintilla.patch | 278 ---------------------------------------------------- 2 files changed, 1 insertion(+), 279 deletions(-) (limited to 'src') diff --git a/src/Makefile b/src/Makefile index 956d31e4..25b0c99b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -381,7 +381,7 @@ else lspawn_url = http://foicica.com/hg/lspawn/archive/tip.zip endif -scintilla_tgz = scintilla351.tgz +scintilla_tgz = scintilla352.tgz scinterm_zip = 4f22b02fb536.zip scintillua_zip = 7ad2658b4ae3.zip lua_tgz = lua-5.2.3.tar.gz diff --git a/src/scintilla.patch b/src/scintilla.patch index 4818d3d4..493fd538 100644 --- a/src/scintilla.patch +++ b/src/scintilla.patch @@ -18,284 +18,6 @@ diff -r 5693714a8b0b src/Catalogue.cxx return 1; } -diff -r 326449de45d0 gtk/ScintillaGTK.cxx ---- a/gtk/ScintillaGTK.cxx Thu Sep 25 09:48:50 2014 +1000 -+++ b/gtk/ScintillaGTK.cxx Tue Oct 07 12:28:16 2014 -0400 -@@ -1563,6 +1563,13 @@ - len--; // Forget the extra '\0' - #endif - -+#if PLAT_GTK_WIN32 -+ // Win32 includes an ending '\0' byte in 'len' for clipboard text from -+ // external applications; ignore it. -+ if (len > 0 && data[len - 1] == '\0') -+ len--; -+#endif -+ - std::string dest(data, len); - if (selectionTypeData == GDK_TARGET_STRING) { - if (IsUnicodeMode()) { -diff -r 01c4696a39a9 src/Editor.cxx ---- a/src/Editor.cxx Tue Sep 30 09:58:13 2014 +1000 -+++ b/src/Editor.cxx Wed Oct 22 13:22:55 2014 -0400 -@@ -112,6 +112,7 @@ - mouseDownCaptures = true; - - lastClickTime = 0; -+ doubleClickCloseThreshold = Point(3, 3); - dwellDelay = SC_TIME_FOREVER; - ticksToDwell = SC_TIME_FOREVER; - dwelling = false; -@@ -3757,10 +3758,10 @@ - EnsureCaretVisible(); - } - --static bool Close(Point pt1, Point pt2) { -- if (abs(pt1.x - pt2.x) > 3) -+static bool Close(Point pt1, Point pt2, Point threshold) { -+ if (abs(pt1.x - pt2.x) > threshold.x) - return false; -- if (abs(pt1.y - pt2.y) > 3) -+ if (abs(pt1.y - pt2.y) > threshold.y) - return false; - return true; - } -@@ -4116,7 +4117,7 @@ - if (shift && !inSelMargin) { - SetSelection(newPos); - } -- if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick)) { -+ if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick, doubleClickCloseThreshold)) { - //Platform::DebugPrintf("Double click %d %d = %d\n", curTime, lastClickTime, curTime - lastClickTime); - SetMouseCapture(true); - if (FineTickerAvailable()) { -diff -r 01c4696a39a9 src/Editor.h ---- a/src/Editor.h Tue Sep 30 09:58:13 2014 +1000 -+++ b/src/Editor.h Wed Oct 22 13:22:55 2014 -0400 -@@ -203,6 +203,7 @@ - - Point lastClick; - unsigned int lastClickTime; -+ Point doubleClickCloseThreshold; - int dwellDelay; - int ticksToDwell; - bool dwelling; -diff -r 326449de45d0 src/EditView.cxx ---- a/src/EditView.cxx Thu Sep 25 09:48:50 2014 +1000 -+++ b/src/EditView.cxx Sat Nov 08 21:00:02 2014 -0500 -@@ -185,6 +185,9 @@ - pixmapIndentGuideHighlight = 0; - llc.SetLevel(LineLayoutCache::llcCaret); - posCache.SetSize(0x400); -+ tabArrowHeight = 4; -+ customDrawTabArrow = NULL; -+ customDrawWrapMarker = NULL; - } - - EditView::~EditView() { -@@ -927,7 +930,11 @@ - rcPlace.right = rcLine.right; - rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; - } -- DrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour()); -+ if (customDrawWrapMarker == NULL) { -+ DrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour()); -+ } else { -+ customDrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour()); -+ } - } - } - -@@ -1201,7 +1208,7 @@ - } - - static void DrawWrapIndentAndMarker(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll, -- int xStart, PRectangle rcLine, ColourOptional background) { -+ int xStart, PRectangle rcLine, ColourOptional background, DrawWrapMarkerFn customDrawWrapMarker) { - // default bgnd here.. - surface->FillRectangle(rcLine, background.isSet ? background : - vsDraw.styles[STYLE_DEFAULT].back); -@@ -1219,7 +1226,11 @@ - else - rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; - -- DrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour()); -+ if (customDrawWrapMarker == NULL) { -+ DrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour()); -+ } else { -+ customDrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour()); -+ } - } - } - -@@ -1463,9 +1474,12 @@ - if (vsDraw.whitespaceColours.fore.isSet) - textFore = vsDraw.whitespaceColours.fore; - surface->PenColour(textFore); -- PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, -+ PRectangle rcTab(rcSegment.left + 1, rcSegment.top + tabArrowHeight, - rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); -- DrawTabArrow(surface, rcTab, static_cast(rcSegment.top + vsDraw.lineHeight / 2)); -+ if (customDrawTabArrow == NULL) -+ DrawTabArrow(surface, rcTab, static_cast(rcSegment.top + vsDraw.lineHeight / 2)); -+ else -+ customDrawTabArrow(surface, rcTab, static_cast(rcSegment.top + vsDraw.lineHeight / 2)); - } - } - } else { -@@ -1632,7 +1646,7 @@ - - if ((ll->wrapIndent != 0) && (subLine > 0)) { - if (phase & drawBack) { -- DrawWrapIndentAndMarker(surface, vsDraw, ll, xStart, rcLine, background); -+ DrawWrapIndentAndMarker(surface, vsDraw, ll, xStart, rcLine, background, customDrawWrapMarker); - } - xStart += static_cast(ll->wrapIndent); - } -diff -r 326449de45d0 src/EditView.h ---- a/src/EditView.h Thu Sep 25 09:48:50 2014 +1000 -+++ b/src/EditView.h Sat Nov 08 21:00:02 2014 -0500 -@@ -42,6 +42,8 @@ - void DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRectangle rcText, - const StyledText &st, size_t start, size_t length, DrawPhase phase); - -+typedef void (*DrawTabArrowFn)(Surface *surface, PRectangle rcTab, int ymid); -+ - /** - * EditView draws the main text area. - */ -@@ -78,6 +80,14 @@ - LineLayoutCache llc; - PositionCache posCache; - -+ int tabArrowHeight; // draw arrow heads this many pixels above/below line midpoint -+ /** Some platforms, notably PLAT_CURSES, do not support Scintilla's native -+ * DrawTabArrow function for drawing tab characters. Allow those platforms to -+ * override it instead of creating a new method in the Surface class that -+ * existing platforms must implement as empty. */ -+ DrawTabArrowFn customDrawTabArrow; -+ DrawWrapMarkerFn customDrawWrapMarker; -+ - EditView(); - virtual ~EditView(); - -diff -r 326449de45d0 src/MarginView.cxx ---- a/src/MarginView.cxx Thu Sep 25 09:48:50 2014 +1000 -+++ b/src/MarginView.cxx Sat Nov 08 21:00:02 2014 -0500 -@@ -102,6 +102,8 @@ - pixmapSelMargin = 0; - pixmapSelPattern = 0; - pixmapSelPatternOffset1 = 0; -+ wrapMarkerPaddingRight = 3; -+ customDrawWrapMarker = NULL; - } - - void MarginView::DropGraphics(bool freeObjects) { -@@ -391,9 +393,13 @@ - rcNumber.top + vs.maxAscent, number, static_cast(strlen(number)), drawAll); - } else if (vs.wrapVisualFlags & SC_WRAPVISUALFLAG_MARGIN) { - PRectangle rcWrapMarker = rcMarker; -- rcWrapMarker.right -= 3; -+ rcWrapMarker.right -= wrapMarkerPaddingRight; - rcWrapMarker.left = rcWrapMarker.right - vs.styles[STYLE_LINENUMBER].aveCharWidth; -- DrawWrapMarker(surface, rcWrapMarker, false, vs.styles[STYLE_LINENUMBER].fore); -+ if (customDrawWrapMarker == NULL) { -+ DrawWrapMarker(surface, rcWrapMarker, false, vs.styles[STYLE_LINENUMBER].fore); -+ } else { -+ customDrawWrapMarker(surface, rcWrapMarker, false, vs.styles[STYLE_LINENUMBER].fore); -+ } - } - } else if (vs.ms[margin].style == SC_MARGIN_TEXT || vs.ms[margin].style == SC_MARGIN_RTEXT) { - if (firstSubLine) { -diff -r 326449de45d0 src/MarginView.h ---- a/src/MarginView.h Thu Sep 25 09:48:50 2014 +1000 -+++ b/src/MarginView.h Sat Nov 08 21:00:02 2014 -0500 -@@ -14,6 +14,8 @@ - - void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour); - -+typedef void (*DrawWrapMarkerFn)(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour); -+ - /** - * MarginView draws the margins. - */ -@@ -25,6 +27,13 @@ - // Highlight current folding block - HighlightDelimiter highlightDelimiter; - -+ int wrapMarkerPaddingRight; // right-most pixel padding of wrap markers -+ /** Some platforms, notably PLAT_CURSES, do not support Scintilla's native -+ * DrawWrapMarker function for drawing wrap markers. Allow those platforms to -+ * override it instead of creating a new method in the Surface class that -+ * existing platforms must implement as empty. */ -+ DrawWrapMarkerFn customDrawWrapMarker; -+ - MarginView(); - - void DropGraphics(bool freeObjects); -diff -r 326449de45d0 src/LineMarker.cxx ---- a/src/LineMarker.cxx Thu Sep 25 09:48:50 2014 +1000 -+++ b/src/LineMarker.cxx Sun Nov 09 00:50:17 2014 -0500 -@@ -72,6 +72,11 @@ - } - - void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, typeOfFold tFold, int marginStyle) const { -+ if (customDraw != NULL) { -+ customDraw(surface, rcWhole, fontForCharacter, tFold, marginStyle, this); -+ return; -+ } -+ - ColourDesired colourHead = back; - ColourDesired colourBody = back; - ColourDesired colourTail = back; -diff -r 326449de45d0 src/LineMarker.h ---- a/src/LineMarker.h Thu Sep 25 09:48:50 2014 +1000 -+++ b/src/LineMarker.h Sun Nov 09 00:50:17 2014 -0500 -@@ -12,6 +12,8 @@ - namespace Scintilla { - #endif - -+typedef void (*DrawLineMarkerFn)(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, int tFold, int marginStyle, const void *lineMarker); -+ - /** - */ - class LineMarker { -@@ -25,6 +27,11 @@ - int alpha; - XPM *pxpm; - RGBAImage *image; -+ /** Some platforms, notably PLAT_CURSES, do not support Scintilla's native -+ * Draw function for drawing line markers. Allow those platforms to override -+ * it instead of creating a new method(s) in the Surface class that existing -+ * platforms must implement as empty. */ -+ DrawLineMarkerFn customDraw; - LineMarker() { - markType = SC_MARK_CIRCLE; - fore = ColourDesired(0,0,0); -@@ -33,6 +40,7 @@ - alpha = SC_ALPHA_NOALPHA; - pxpm = NULL; - image = NULL; -+ customDraw = NULL; - } - LineMarker(const LineMarker &) { - // Defined to avoid pxpm being blindly copied, not as a complete copy constructor -@@ -43,6 +51,7 @@ - alpha = SC_ALPHA_NOALPHA; - pxpm = NULL; - image = NULL; -+ customDraw = NULL; - } - ~LineMarker() { - delete pxpm; -@@ -60,6 +69,7 @@ - pxpm = NULL; - delete image; - image = NULL; -+ customDraw = NULL; - } - return *this; - } diff -r 326449de45d0 src/ScintillaBase.cxx --- a/src/ScintillaBase.cxx Thu Sep 25 09:48:50 2014 +1000 +++ b/src/ScintillaBase.cxx Sun Nov 30 23:25:36 2014 -0500 -- cgit v1.2.3