diff options
author | 2014-12-09 13:30:54 -0500 | |
---|---|---|
committer | 2014-12-09 13:30:54 -0500 | |
commit | 1436d7b77f2e51485627d45eb015261eb8953a1b (patch) | |
tree | 77776d087b40ae79f3d11f98984c3657b3ddea9b | |
parent | 3dae6913eb76a89af4ba35ea0b4b50a1f9b4f8b5 (diff) |
Updated to Scintilla 3.5.2.
-rw-r--r-- | core/.buffer.luadoc | 2 | ||||
-rw-r--r-- | core/iface.lua | 2 | ||||
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/scintilla.patch | 278 |
4 files changed, 4 insertions, 280 deletions
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc index a1424c32..37fde7d3 100644 --- a/core/.buffer.luadoc +++ b/core/.buffer.luadoc @@ -60,6 +60,8 @@ -- * `buffer.ANNOTATION_BOXED` -- Indent annotations to match the annotated text and outline them with a -- box. +-- * `buffer.ANNOTATION_INDENTED` +-- Indent non-decorated annotations to match the annotated text. -- -- The default value is `buffer.ANNOTATION_HIDDEN`. -- @field auto_c_auto_hide (bool) diff --git a/core/iface.lua b/core/iface.lua index 1af669d4..31ed0fad 100644 --- a/core/iface.lua +++ b/core/iface.lua @@ -14,7 +14,7 @@ module('_SCINTILLA')]] -- @class table -- @name constants -- @see _G.buffer -M.constants = {ALPHA_NOALPHA=256,ALPHA_OPAQUE=255,ALPHA_TRANSPARENT=0,ANNOTATION_BOXED=2,ANNOTATION_HIDDEN=0,ANNOTATION_STANDARD=1,AUTOMATICFOLD_CHANGE=0x0004,AUTOMATICFOLD_CLICK=0x0002,AUTOMATICFOLD_SHOW=0x0001,CARETSTICKY_OFF=0,CARETSTICKY_ON=1,CARETSTICKY_WHITESPACE=2,CARETSTYLE_BLOCK=2,CARETSTYLE_INVISIBLE=0,CARETSTYLE_LINE=1,CARET_EVEN=0x08,CARET_JUMPS=0x10,CARET_SLOP=0x01,CARET_STRICT=0x04,CASEINSENSITIVEBEHAVIOUR_IGNORECASE=1,CASEINSENSITIVEBEHAVIOUR_RESPECTCASE=0,CASE_LOWER=2,CASE_MIXED=0,CASE_UPPER=1,CP_UTF8=65001,CURSORARROW=2,CURSORNORMAL=-1,CURSORREVERSEARROW=7,CURSORWAIT=4,EDGE_BACKGROUND=2,EDGE_LINE=1,EDGE_NONE=0,EOL_CR=1,EOL_CRLF=0,EOL_LF=2,FIND_MATCHCASE=0x4,FIND_REGEXP=6291456,FIND_WHOLEWORD=0x2,FIND_WORDSTART=0x00100000,FOLDACTION_CONTRACT=0,FOLDACTION_EXPAND=1,FOLDACTION_TOGGLE=2,FOLDFLAG_LEVELNUMBERS=0x0040,FOLDFLAG_LINEAFTER_CONTRACTED=0x0010,FOLDFLAG_LINEAFTER_EXPANDED=0x0008,FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004,FOLDFLAG_LINEBEFORE_EXPANDED=0x0002,FOLDFLAG_LINESTATE=0x0080,FOLDLEVELBASE=0x400,FOLDLEVELHEADERFLAG=0x2000,FOLDLEVELNUMBERMASK=0x0FFF,FOLDLEVELWHITEFLAG=0x1000,IME_INLINE=1,IME_WINDOWED=0,INDIC_BOX=6,INDIC_COMPOSITIONTHICK=14,INDIC_CONTAINER=8,INDIC_DASH=9,INDIC_DIAGONAL=3,INDIC_DOTBOX=12,INDIC_DOTS=10,INDIC_HIDDEN=5,INDIC_MAX=31,INDIC_PLAIN=0,INDIC_ROUNDBOX=7,INDIC_SQUIGGLE=1,INDIC_SQUIGGLELOW=11,INDIC_SQUIGGLEPIXMAP=13,INDIC_STRAIGHTBOX=8,INDIC_STRIKE=4,INDIC_TT=2,IV_LOOKBOTH=3,IV_LOOKFORWARD=2,IV_NONE=0,IV_REAL=1,LASTSTEPINUNDOREDO=0x100,MARGINOPTION_NONE=0,MARGINOPTION_SUBLINESELECT=1,MARGIN_BACK=2,MARGIN_FORE=3,MARGIN_NUMBER=1,MARGIN_RTEXT=5,MARGIN_SYMBOL=0,MARGIN_TEXT=4,MARKER_MAX=31,MARKNUM_FOLDER=30,MARKNUM_FOLDEREND=25,MARKNUM_FOLDERMIDTAIL=27,MARKNUM_FOLDEROPEN=31,MARKNUM_FOLDEROPENMID=26,MARKNUM_FOLDERSUB=29,MARKNUM_FOLDERTAIL=28,MARK_ARROW=2,MARK_ARROWDOWN=6,MARK_ARROWS=24,MARK_AVAILABLE=28,MARK_BACKGROUND=22,MARK_BOOKMARK=31,MARK_BOXMINUS=14,MARK_BOXMINUSCONNECTED=15,MARK_BOXPLUS=12,MARK_BOXPLUSCONNECTED=13,MARK_CHARACTER=10000,MARK_CIRCLE=0,MARK_CIRCLEMINUS=20,MARK_CIRCLEMINUSCONNECTED=21,MARK_CIRCLEPLUS=18,MARK_CIRCLEPLUSCONNECTED=19,MARK_DOTDOTDOT=23,MARK_EMPTY=5,MARK_FULLRECT=26,MARK_LCORNER=10,MARK_LCORNERCURVE=16,MARK_LEFTRECT=27,MARK_MINUS=7,MARK_PIXMAP=25,MARK_PLUS=8,MARK_RGBAIMAGE=30,MARK_ROUNDRECT=1,MARK_SHORTARROW=4,MARK_SMALLRECT=3,MARK_TCORNER=11,MARK_TCORNERCURVE=17,MARK_UNDERLINE=29,MARK_VLINE=9,MASK_FOLDERS=-33554432,MAX_MARGIN=4,MODEVENTMASKALL=0x3FFFFF,MOD_ALT=4,MOD_BEFOREDELETE=0x800,MOD_BEFOREINSERT=0x400,MOD_CHANGEANNOTATION=0x20000,MOD_CHANGEFOLD=0x8,MOD_CHANGEINDICATOR=0x4000,MOD_CHANGELINESTATE=0x8000,MOD_CHANGEMARGIN=0x10000,MOD_CHANGEMARKER=0x200,MOD_CHANGESTYLE=0x4,MOD_CHANGETABSTOPS=0x200000,MOD_CONTAINER=0x40000,MOD_CTRL=2,MOD_DELETETEXT=0x2,MOD_INSERTCHECK=0x100000,MOD_INSERTTEXT=0x1,MOD_LEXERSTATE=0x80000,MOD_META=16,MOD_NORM=0,MOD_SHIFT=1,MOD_SUPER=8,MOUSE_DRAG=2,MOUSE_PRESS=1,MOUSE_RELEASE=3,MULTIAUTOC_EACH=1,MULTIAUTOC_ONCE=0,MULTILINEUNDOREDO=0x1000,MULTIPASTE_EACH=1,MULTIPASTE_ONCE=0,MULTISTEPUNDOREDO=0x80,ORDER_CUSTOM=2,ORDER_PERFORMSORT=1,ORDER_PRESORTED=0,PERFORMED_REDO=0x40,PERFORMED_UNDO=0x20,PERFORMED_USER=0x10,PHASES_MULTIPLE=2,PHASES_ONE=0,PHASES_TWO=1,SCN_AUTOCCANCELLED=2025,SCN_AUTOCCHARDELETED=2026,SCN_AUTOCSELECTION=2022,SCN_CALLTIPCLICK=2021,SCN_CHARADDED=2001,SCN_DOUBLECLICK=2006,SCN_DWELLEND=2017,SCN_DWELLSTART=2016,SCN_FOCUSIN=2028,SCN_FOCUSOUT=2029,SCN_HOTSPOTCLICK=2019,SCN_HOTSPOTDOUBLECLICK=2020,SCN_HOTSPOTRELEASECLICK=2027,SCN_INDICATORCLICK=2023,SCN_INDICATORRELEASE=2024,SCN_KEY=2005,SCN_MACRORECORD=2009,SCN_MARGINCLICK=2010,SCN_MODIFIED=2008,SCN_MODIFYATTEMPTRO=2004,SCN_NEEDSHOWN=2011,SCN_PAINTED=2013,SCN_SAVEPOINTLEFT=2003,SCN_SAVEPOINTREACHED=2002,SCN_STYLENEEDED=2000,SCN_UPDATEUI=2007,SCN_URIDROPPED=2015,SCN_USERLISTSELECTION=2014,SCN_ZOOM=2018,SEL_LINES=2,SEL_RECTANGLE=1,SEL_STREAM=0,SEL_THIN=3,STARTACTION=0x2000,STYLE_BRACEBAD=35,STYLE_BRACELIGHT=34,STYLE_CALLTIP=38,STYLE_CONTROLCHAR=36,STYLE_DEFAULT=32,STYLE_INDENTGUIDE=37,STYLE_LASTPREDEFINED=39,STYLE_LINENUMBER=33,STYLE_MAX=255,TIME_FOREVER=10000000,UPDATE_CONTENT=0x1,UPDATE_H_SCROLL=0x8,UPDATE_SELECTION=0x2,UPDATE_V_SCROLL=0x4,VISIBLE_SLOP=0x01,VISIBLE_STRICT=0x04,VS_NONE=0,VS_RECTANGULARSELECTION=1,VS_USERACCESSIBLE=2,WRAPINDENT_FIXED=0,WRAPINDENT_INDENT=2,WRAPINDENT_SAME=1,WRAPVISUALFLAGLOC_DEFAULT=0x0000,WRAPVISUALFLAGLOC_END_BY_TEXT=0x0001,WRAPVISUALFLAGLOC_START_BY_TEXT=0x0002,WRAPVISUALFLAG_END=0x0001,WRAPVISUALFLAG_MARGIN=0x0004,WRAPVISUALFLAG_NONE=0x0000,WRAPVISUALFLAG_START=0x0002,WRAP_CHAR=2,WRAP_NONE=0,WRAP_WHITESPACE=3,WRAP_WORD=1,WS_INVISIBLE=0,WS_VISIBLEAFTERINDENT=2,WS_VISIBLEALWAYS=1} +M.constants = {ALPHA_NOALPHA=256,ALPHA_OPAQUE=255,ALPHA_TRANSPARENT=0,ANNOTATION_BOXED=2,ANNOTATION_HIDDEN=0,ANNOTATION_INDENTED=3,ANNOTATION_STANDARD=1,AUTOMATICFOLD_CHANGE=0x0004,AUTOMATICFOLD_CLICK=0x0002,AUTOMATICFOLD_SHOW=0x0001,CARETSTICKY_OFF=0,CARETSTICKY_ON=1,CARETSTICKY_WHITESPACE=2,CARETSTYLE_BLOCK=2,CARETSTYLE_INVISIBLE=0,CARETSTYLE_LINE=1,CARET_EVEN=0x08,CARET_JUMPS=0x10,CARET_SLOP=0x01,CARET_STRICT=0x04,CASEINSENSITIVEBEHAVIOUR_IGNORECASE=1,CASEINSENSITIVEBEHAVIOUR_RESPECTCASE=0,CASE_LOWER=2,CASE_MIXED=0,CASE_UPPER=1,CP_UTF8=65001,CURSORARROW=2,CURSORNORMAL=-1,CURSORREVERSEARROW=7,CURSORWAIT=4,EDGE_BACKGROUND=2,EDGE_LINE=1,EDGE_NONE=0,EOL_CR=1,EOL_CRLF=0,EOL_LF=2,FIND_CXX11REGEX=0x00800000,FIND_MATCHCASE=0x4,FIND_REGEXP=6291456,FIND_WHOLEWORD=0x2,FIND_WORDSTART=0x00100000,FOLDACTION_CONTRACT=0,FOLDACTION_EXPAND=1,FOLDACTION_TOGGLE=2,FOLDFLAG_LEVELNUMBERS=0x0040,FOLDFLAG_LINEAFTER_CONTRACTED=0x0010,FOLDFLAG_LINEAFTER_EXPANDED=0x0008,FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004,FOLDFLAG_LINEBEFORE_EXPANDED=0x0002,FOLDFLAG_LINESTATE=0x0080,FOLDLEVELBASE=0x400,FOLDLEVELHEADERFLAG=0x2000,FOLDLEVELNUMBERMASK=0x0FFF,FOLDLEVELWHITEFLAG=0x1000,IME_INLINE=1,IME_WINDOWED=0,INDIC_BOX=6,INDIC_COMPOSITIONTHICK=14,INDIC_CONTAINER=8,INDIC_DASH=9,INDIC_DIAGONAL=3,INDIC_DOTBOX=12,INDIC_DOTS=10,INDIC_HIDDEN=5,INDIC_IME=32,INDIC_IME_MAX=35,INDIC_MAX=35,INDIC_PLAIN=0,INDIC_ROUNDBOX=7,INDIC_SQUIGGLE=1,INDIC_SQUIGGLELOW=11,INDIC_SQUIGGLEPIXMAP=13,INDIC_STRAIGHTBOX=8,INDIC_STRIKE=4,INDIC_TT=2,IV_LOOKBOTH=3,IV_LOOKFORWARD=2,IV_NONE=0,IV_REAL=1,LASTSTEPINUNDOREDO=0x100,MARGINOPTION_NONE=0,MARGINOPTION_SUBLINESELECT=1,MARGIN_BACK=2,MARGIN_FORE=3,MARGIN_NUMBER=1,MARGIN_RTEXT=5,MARGIN_SYMBOL=0,MARGIN_TEXT=4,MARKER_MAX=31,MARKNUM_FOLDER=30,MARKNUM_FOLDEREND=25,MARKNUM_FOLDERMIDTAIL=27,MARKNUM_FOLDEROPEN=31,MARKNUM_FOLDEROPENMID=26,MARKNUM_FOLDERSUB=29,MARKNUM_FOLDERTAIL=28,MARK_ARROW=2,MARK_ARROWDOWN=6,MARK_ARROWS=24,MARK_AVAILABLE=28,MARK_BACKGROUND=22,MARK_BOOKMARK=31,MARK_BOXMINUS=14,MARK_BOXMINUSCONNECTED=15,MARK_BOXPLUS=12,MARK_BOXPLUSCONNECTED=13,MARK_CHARACTER=10000,MARK_CIRCLE=0,MARK_CIRCLEMINUS=20,MARK_CIRCLEMINUSCONNECTED=21,MARK_CIRCLEPLUS=18,MARK_CIRCLEPLUSCONNECTED=19,MARK_DOTDOTDOT=23,MARK_EMPTY=5,MARK_FULLRECT=26,MARK_LCORNER=10,MARK_LCORNERCURVE=16,MARK_LEFTRECT=27,MARK_MINUS=7,MARK_PIXMAP=25,MARK_PLUS=8,MARK_RGBAIMAGE=30,MARK_ROUNDRECT=1,MARK_SHORTARROW=4,MARK_SMALLRECT=3,MARK_TCORNER=11,MARK_TCORNERCURVE=17,MARK_UNDERLINE=29,MARK_VLINE=9,MASK_FOLDERS=-33554432,MAX_MARGIN=4,MODEVENTMASKALL=0x3FFFFF,MOD_ALT=4,MOD_BEFOREDELETE=0x800,MOD_BEFOREINSERT=0x400,MOD_CHANGEANNOTATION=0x20000,MOD_CHANGEFOLD=0x8,MOD_CHANGEINDICATOR=0x4000,MOD_CHANGELINESTATE=0x8000,MOD_CHANGEMARGIN=0x10000,MOD_CHANGEMARKER=0x200,MOD_CHANGESTYLE=0x4,MOD_CHANGETABSTOPS=0x200000,MOD_CONTAINER=0x40000,MOD_CTRL=2,MOD_DELETETEXT=0x2,MOD_INSERTCHECK=0x100000,MOD_INSERTTEXT=0x1,MOD_LEXERSTATE=0x80000,MOD_META=16,MOD_NORM=0,MOD_SHIFT=1,MOD_SUPER=8,MOUSE_DRAG=2,MOUSE_PRESS=1,MOUSE_RELEASE=3,MULTIAUTOC_EACH=1,MULTIAUTOC_ONCE=0,MULTILINEUNDOREDO=0x1000,MULTIPASTE_EACH=1,MULTIPASTE_ONCE=0,MULTISTEPUNDOREDO=0x80,ORDER_CUSTOM=2,ORDER_PERFORMSORT=1,ORDER_PRESORTED=0,PERFORMED_REDO=0x40,PERFORMED_UNDO=0x20,PERFORMED_USER=0x10,PHASES_MULTIPLE=2,PHASES_ONE=0,PHASES_TWO=1,SCN_AUTOCCANCELLED=2025,SCN_AUTOCCHARDELETED=2026,SCN_AUTOCSELECTION=2022,SCN_CALLTIPCLICK=2021,SCN_CHARADDED=2001,SCN_DOUBLECLICK=2006,SCN_DWELLEND=2017,SCN_DWELLSTART=2016,SCN_FOCUSIN=2028,SCN_FOCUSOUT=2029,SCN_HOTSPOTCLICK=2019,SCN_HOTSPOTDOUBLECLICK=2020,SCN_HOTSPOTRELEASECLICK=2027,SCN_INDICATORCLICK=2023,SCN_INDICATORRELEASE=2024,SCN_KEY=2005,SCN_MACRORECORD=2009,SCN_MARGINCLICK=2010,SCN_MODIFIED=2008,SCN_MODIFYATTEMPTRO=2004,SCN_NEEDSHOWN=2011,SCN_PAINTED=2013,SCN_SAVEPOINTLEFT=2003,SCN_SAVEPOINTREACHED=2002,SCN_STYLENEEDED=2000,SCN_UPDATEUI=2007,SCN_URIDROPPED=2015,SCN_USERLISTSELECTION=2014,SCN_ZOOM=2018,SEL_LINES=2,SEL_RECTANGLE=1,SEL_STREAM=0,SEL_THIN=3,STARTACTION=0x2000,STYLE_BRACEBAD=35,STYLE_BRACELIGHT=34,STYLE_CALLTIP=38,STYLE_CONTROLCHAR=36,STYLE_DEFAULT=32,STYLE_INDENTGUIDE=37,STYLE_LASTPREDEFINED=39,STYLE_LINENUMBER=33,STYLE_MAX=255,TIME_FOREVER=10000000,UPDATE_CONTENT=0x1,UPDATE_H_SCROLL=0x8,UPDATE_SELECTION=0x2,UPDATE_V_SCROLL=0x4,VISIBLE_SLOP=0x01,VISIBLE_STRICT=0x04,VS_NONE=0,VS_RECTANGULARSELECTION=1,VS_USERACCESSIBLE=2,WRAPINDENT_FIXED=0,WRAPINDENT_INDENT=2,WRAPINDENT_SAME=1,WRAPVISUALFLAGLOC_DEFAULT=0x0000,WRAPVISUALFLAGLOC_END_BY_TEXT=0x0001,WRAPVISUALFLAGLOC_START_BY_TEXT=0x0002,WRAPVISUALFLAG_END=0x0001,WRAPVISUALFLAG_MARGIN=0x0004,WRAPVISUALFLAG_NONE=0x0000,WRAPVISUALFLAG_START=0x0002,WRAP_CHAR=2,WRAP_NONE=0,WRAP_WHITESPACE=3,WRAP_WORD=1,WS_INVISIBLE=0,WS_VISIBLEAFTERINDENT=2,WS_VISIBLEALWAYS=1} --- -- Map of Scintilla function names to tables containing their IDs, return types, 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<int>(rcSegment.top + vsDraw.lineHeight / 2)); -+ if (customDrawTabArrow == NULL) -+ DrawTabArrow(surface, rcTab, static_cast<int>(rcSegment.top + vsDraw.lineHeight / 2)); -+ else -+ customDrawTabArrow(surface, rcTab, static_cast<int>(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<int>(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<int>(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 |