aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/.buffer.luadoc1
-rw-r--r--core/iface.lua6
-rw-r--r--properties.lua3
-rw-r--r--src/Makefile13
-rw-r--r--src/scintilla.patch49
-rw-r--r--src/scintilla_backports/6095_ae52e0c68190.patch43
-rw-r--r--src/scintilla_backports/6097_7f22895eaddb.patch34
-rw-r--r--src/scintilla_backports/6099_809112c81196.patch45
-rw-r--r--src/scintilla_backports/6101_b82fe8d33961.patch94
-rw-r--r--src/scintilla_backports/6102_e12538e52567.patch61
-rw-r--r--src/scintilla_backports/6108_b833c0659497.patch74
-rw-r--r--src/scintilla_backports/6111_225f39cfd931.patch101
-rw-r--r--src/scintilla_backports/6116_6c62b379a52e.patch59
-rw-r--r--src/scintilla_backports/6117_23546875480b.patch313
-rw-r--r--src/scintilla_backports/6118_559dea66606f.patch20
-rw-r--r--src/scintilla_backports/6119_71bee2f06619.patch24
-rw-r--r--src/scintilla_backports/6120_8e0cb37c4972.patch71
-rw-r--r--src/scintilla_backports/6124_4527b3c217a4.patch43
-rw-r--r--src/scintilla_backports/6131_a78e38849624.patch56
-rw-r--r--src/scintilla_backports/6132_6cf19f2bf214.patch19
-rw-r--r--src/scintilla_backports/6133_30f1573f17ac.patch19
-rw-r--r--src/scintilla_backports/6134_0253f113f223.patch36
-rw-r--r--src/scintilla_backports/6135_34665edc7efd.patch20
-rw-r--r--src/scintilla_backports/6136_2b25287311d0.patch43
-rw-r--r--src/scintilla_backports/6137_c3bba4a9193e.patch20
-rw-r--r--src/scintilla_backports/6138_55368b05bb72.patch40
26 files changed, 1251 insertions, 56 deletions
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc
index 942b0c7b..29b339d9 100644
--- a/core/.buffer.luadoc
+++ b/core/.buffer.luadoc
@@ -3185,6 +3185,7 @@ function set_lexer(buffer, lexer) end
-- * STYLE_LASTPREDEFINED
-- Unused Functions.
+-- * accessibility
-- * add_ref_document
-- * add_styled_text
-- * add_tab_stop
diff --git a/core/iface.lua b/core/iface.lua
index 268bf482..46c470f7 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_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_CAMEL=3,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_MULTILINE=3,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,FOLDDISPLAYTEXT_BOXED=2,FOLDDISPLAYTEXT_HIDDEN=0,FOLDDISPLAYTEXT_STANDARD=1,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,IDLESTYLING_AFTERVISIBLE=2,IDLESTYLING_ALL=3,IDLESTYLING_NONE=0,IDLESTYLING_TOVISIBLE=1,IME_INLINE=1,IME_WINDOWED=0,INDIC_BOX=6,INDIC_COMPOSITIONTHICK=14,INDIC_COMPOSITIONTHIN=15,INDIC_CONTAINER=8,INDIC_DASH=9,INDIC_DIAGONAL=3,INDIC_DOTBOX=12,INDIC_DOTS=10,INDIC_FULLBOX=16,INDIC_HIDDEN=5,INDIC_IME=32,INDIC_IME_MAX=35,INDIC_MAX=35,INDIC_PLAIN=0,INDIC_POINT=18,INDIC_POINTCHARACTER=19,INDIC_ROUNDBOX=7,INDIC_SQUIGGLE=1,INDIC_SQUIGGLELOW=11,INDIC_SQUIGGLEPIXMAP=13,INDIC_STRAIGHTBOX=8,INDIC_STRIKE=4,INDIC_TEXTFORE=17,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_COLOUR=6,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,POPUP_ALL=1,POPUP_NEVER=0,POPUP_TEXT=2,SCN_AUTOCCANCELLED=2025,SCN_AUTOCCHARDELETED=2026,SCN_AUTOCCOMPLETED=2030,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_MARGINRIGHTCLICK=2031,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_FOLDDISPLAYTEXT=39,STYLE_INDENTGUIDE=37,STYLE_LASTPREDEFINED=39,STYLE_LINENUMBER=33,STYLE_MAX=255,TD_LONGARROW=0,TD_STRIKEOUT=1,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_NOWRAPLINESTART=4,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,WS_VISIBLEONLYININDENT=3}
+M.constants = {ACCESSIBILITY_DISABLED=0,ACCESSIBILITY_ENABLED=1,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_CAMEL=3,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_MULTILINE=3,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,FOLDDISPLAYTEXT_BOXED=2,FOLDDISPLAYTEXT_HIDDEN=0,FOLDDISPLAYTEXT_STANDARD=1,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,IDLESTYLING_AFTERVISIBLE=2,IDLESTYLING_ALL=3,IDLESTYLING_NONE=0,IDLESTYLING_TOVISIBLE=1,IME_INLINE=1,IME_WINDOWED=0,INDIC_BOX=6,INDIC_COMPOSITIONTHICK=14,INDIC_COMPOSITIONTHIN=15,INDIC_CONTAINER=8,INDIC_DASH=9,INDIC_DIAGONAL=3,INDIC_DOTBOX=12,INDIC_DOTS=10,INDIC_FULLBOX=16,INDIC_HIDDEN=5,INDIC_IME=32,INDIC_IME_MAX=35,INDIC_MAX=35,INDIC_PLAIN=0,INDIC_POINT=18,INDIC_POINTCHARACTER=19,INDIC_ROUNDBOX=7,INDIC_SQUIGGLE=1,INDIC_SQUIGGLELOW=11,INDIC_SQUIGGLEPIXMAP=13,INDIC_STRAIGHTBOX=8,INDIC_STRIKE=4,INDIC_TEXTFORE=17,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_COLOUR=6,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,SCN_AUTOCCANCELLED=2025,SCN_AUTOCCHARDELETED=2026,SCN_AUTOCCOMPLETED=2030,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_MARGINRIGHTCLICK=2031,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_FOLDDISPLAYTEXT=39,STYLE_INDENTGUIDE=37,STYLE_LASTPREDEFINED=39,STYLE_LINENUMBER=33,STYLE_MAX=255,TD_LONGARROW=0,TD_STRIKEOUT=1,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_NOWRAPLINESTART=4,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,WS_VISIBLEONLYININDENT=3}
---
-- Map of Scintilla function names to tables containing their IDs, return types,
@@ -31,7 +31,7 @@ M.constants = {ALPHA_NOALPHA=256,ALPHA_OPAQUE=255,ALPHA_TRANSPARENT=0,ANNOTATION
-- + `8`: String return value.
-- @class table
-- @name functions
-M.functions = {add_ref_document={2376,0,0,1},add_selection={2573,1,3,3},add_styled_text={2002,0,2,9},add_tab_stop={2676,0,1,1},add_text={2001,0,2,7},add_undo_action={2560,0,1,1},allocate={2446,0,1,0},allocate_extended_styles={2553,1,1,0},allocate_sub_styles={4020,1,1,1},annotation_clear_all={2547,0,0,0},append_text={2282,0,2,7},assign_cmd_key={2070,0,6,1},auto_c_active={2102,5,0,0},auto_c_cancel={2101,0,0,0},auto_c_complete={2104,0,0,0},auto_c_pos_start={2103,3,0,0},auto_c_select={2108,0,0,7},auto_c_show={2100,0,1,7},auto_c_stops={2105,0,0,7},back_tab={2328,0,0,0},begin_undo_action={2078,0,0,0},brace_bad_light={2352,0,3,0},brace_bad_light_indicator={2499,0,5,1},brace_highlight={2351,0,3,3},brace_highlight_indicator={2498,0,5,1},brace_match={2353,3,3,1},call_tip_active={2202,5,0,0},call_tip_cancel={2201,0,0,0},call_tip_pos_start={2203,3,0,0},call_tip_set_hlt={2204,0,1,1},call_tip_show={2200,0,3,7},can_paste={2173,5,0,0},can_redo={2016,5,0,0},can_undo={2174,5,0,0},cancel={2325,0,0,0},change_insertion={2672,0,2,7},change_lexer_state={2617,1,3,3},char_left={2304,0,0,0},char_left_extend={2305,0,0,0},char_left_rect_extend={2428,0,0,0},char_position_from_point={2561,3,1,1},char_position_from_point_close={2562,3,1,1},char_right={2306,0,0,0},char_right_extend={2307,0,0,0},char_right_rect_extend={2429,0,0,0},choose_caret_x={2399,0,0,0},clear={2180,0,0,0},clear_all={2004,0,0,0},clear_all_cmd_keys={2072,0,0,0},clear_cmd_key={2071,0,6,0},clear_document_style={2005,0,0,0},clear_registered_images={2408,0,0,0},clear_representation={2667,0,7,0},clear_selections={2571,0,0,0},clear_tab_stops={2675,0,1,0},colourise={4003,0,3,3},contracted_fold_next={2618,1,1,0},convert_eols={2029,0,1,0},copy={2178,0,0,0},copy_allow_line={2519,0,0,0},copy_range={2419,0,3,3},copy_text={2420,0,2,7},count_characters={2633,1,3,3},create_document={2375,1,0,0},create_loader={2632,1,1,0},cut={2177,0,0,0},del_line_left={2395,0,0,0},del_line_right={2396,0,0,0},del_word_left={2335,0,0,0},del_word_right={2336,0,0,0},del_word_right_end={2518,0,0,0},delete_back={2326,0,0,0},delete_back_not_line={2344,0,0,0},delete_range={2645,0,3,1},describe_key_word_sets={4017,1,0,8},describe_property={4016,1,7,8},doc_line_from_visible={2221,1,1,0},document_end={2318,0,0,0},document_end_extend={2319,0,0,0},document_start={2316,0,0,0},document_start_extend={2317,0,0,0},drop_selection_n={2671,0,1,0},edit_toggle_overtype={2324,0,0,0},empty_undo_buffer={2175,0,0,0},encoded_from_utf8={2449,1,7,8},end_undo_action={2079,0,0,0},ensure_visible={2232,0,1,0},ensure_visible_enforce_policy={2234,0,1,0},expand_children={2239,0,1,1},find_column={2456,1,1,1},find_indicator_flash={2641,0,3,3},find_indicator_hide={2642,0,0,0},find_indicator_show={2640,0,3,3},find_text={2150,3,1,11},fold_all={2662,0,1,0},fold_children={2238,0,1,1},fold_line={2237,0,1,1},form_feed={2330,0,0,0},format_range={2151,3,5,12},free_sub_styles={4023,0,0,0},get_cur_line={2027,1,2,8},get_hotspot_active_back={2495,4,0,0},get_hotspot_active_fore={2494,4,0,0},get_last_child={2224,1,1,1},get_line={2153,1,1,8},get_line_sel_end_position={2425,3,1,0},get_line_sel_start_position={2424,3,1,0},get_next_tab_stop={2677,1,1,1},get_sel_text={2161,1,0,8},get_styled_text={2015,1,0,10},get_text={2182,1,2,8},get_text_range={2162,1,0,10},goto_line={2024,0,1,0},goto_pos={2025,0,3,0},grab_focus={2400,0,0,0},hide_lines={2227,0,1,1},hide_selection={2163,0,5,0},home={2312,0,0,0},home_display={2345,0,0,0},home_display_extend={2346,0,0,0},home_extend={2313,0,0,0},home_rect_extend={2430,0,0,0},home_wrap={2349,0,0,0},home_wrap_extend={2450,0,0,0},indicator_all_on_for={2506,1,3,0},indicator_clear_range={2505,0,3,1},indicator_end={2509,1,1,3},indicator_fill_range={2504,0,3,1},indicator_start={2508,1,1,3},indicator_value_at={2507,1,1,3},insert_text={2003,0,3,7},is_range_word={2691,5,3,3},line_copy={2455,0,0,0},line_cut={2337,0,0,0},line_delete={2338,0,0,0},line_down={2300,0,0,0},line_down_extend={2301,0,0,0},line_down_rect_extend={2426,0,0,0},line_duplicate={2404,0,0,0},line_end={2314,0,0,0},line_end_display={2347,0,0,0},line_end_display_extend={2348,0,0,0},line_end_extend={2315,0,0,0},line_end_rect_extend={2432,0,0,0},line_end_wrap={2451,0,0,0},line_end_wrap_extend={2452,0,0,0},line_from_position={2166,1,3,0},line_length={2350,1,1,0},line_scroll={2168,0,1,1},line_scroll_down={2342,0,0,0},line_scroll_up={2343,0,0,0},line_transpose={2339,0,0,0},line_up={2302,0,0,0},line_up_extend={2303,0,0,0},line_up_rect_extend={2427,0,0,0},lines_join={2288,0,0,0},lines_split={2289,0,1,0},load_lexer_library={4007,0,0,7},lower_case={2340,0,0,0},margin_text_clear_all={2536,0,0,0},marker_add={2043,1,1,1},marker_add_set={2466,0,1,1},marker_define={2040,0,1,1},marker_define_pixmap={2049,0,1,7},marker_define_rgba_image={2626,0,1,7},marker_delete={2044,0,1,1},marker_delete_all={2045,0,1,0},marker_delete_handle={2018,0,1,0},marker_enable_highlight={2293,0,5,0},marker_get={2046,1,1,0},marker_line_from_handle={2017,1,1,0},marker_next={2047,1,1,1},marker_previous={2048,1,1,1},marker_symbol_defined={2529,1,1,0},move_caret_inside_view={2401,0,0,0},move_selected_lines_down={2621,0,0,0},move_selected_lines_up={2620,0,0,0},multi_edge_add_line={2694,0,1,4},multi_edge_clear_all={2695,0,0,0},multiple_select_add_each={2689,0,0,0},multiple_select_add_next={2688,0,0,0},new_line={2329,0,0,0},null={2172,0,0,0},page_down={2322,0,0,0},page_down_extend={2323,0,0,0},page_down_rect_extend={2434,0,0,0},page_up={2320,0,0,0},page_up_extend={2321,0,0,0},page_up_rect_extend={2433,0,0,0},para_down={2413,0,0,0},para_down_extend={2414,0,0,0},para_up={2415,0,0,0},para_up_extend={2416,0,0,0},paste={2179,0,0,0},point_x_from_position={2164,1,0,3},point_y_from_position={2165,1,0,3},position_after={2418,3,3,0},position_before={2417,3,3,0},position_from_line={2167,3,1,0},position_from_point={2022,3,1,1},position_from_point_close={2023,3,1,1},position_relative={2670,3,3,1},private_lexer_call={4013,1,1,1},property_names={4014,1,0,8},property_type={4015,1,7,0},redo={2011,0,0,0},register_image={2405,0,1,7},register_rgba_image={2627,0,1,7},release_all_extended_styles={2552,0,0,0},release_document={2377,0,0,1},replace_sel={2170,0,0,7},replace_target={2194,1,2,7},replace_target_re={2195,1,2,7},rotate_selection={2606,0,0,0},scroll_caret={2169,0,0,0},scroll_range={2569,0,3,3},scroll_to_end={2629,0,0,0},scroll_to_start={2628,0,0,0},search_anchor={2366,0,0,0},search_in_target={2197,1,2,7},search_next={2367,1,1,7},search_prev={2368,1,1,7},select_all={2013,0,0,0},selection_duplicate={2469,0,0,0},set_chars_default={2444,0,0,0},set_empty_selection={2556,0,3,0},set_fold_margin_colour={2290,0,5,4},set_fold_margin_hi_colour={2291,0,5,4},set_hotspot_active_back={2411,0,5,4},set_hotspot_active_fore={2410,0,5,4},set_length_for_encode={2448,0,1,0},set_save_point={2014,0,0,0},set_sel={2160,0,3,3},set_sel_back={2068,0,5,4},set_sel_fore={2067,0,5,4},set_selection={2572,1,3,3},set_styling={2033,0,2,1},set_styling_ex={2073,0,2,7},set_target_range={2686,0,3,3},set_text={2181,0,0,7},set_visible_policy={2394,0,1,1},set_whitespace_back={2085,0,5,4},set_whitespace_fore={2084,0,5,4},set_x_caret_policy={2402,0,1,1},set_y_caret_policy={2403,0,1,1},show_lines={2226,0,1,1},start_record={3001,0,0,0},start_styling={2032,0,3,1},stop_record={3002,0,0,0},stuttered_page_down={2437,0,0,0},stuttered_page_down_extend={2438,0,0,0},stuttered_page_up={2435,0,0,0},stuttered_page_up_extend={2436,0,0,0},style_clear_all={2050,0,0,0},style_reset_default={2058,0,0,0},swap_main_anchor_caret={2607,0,0,0},tab={2327,0,0,0},target_as_utf8={2447,1,0,8},target_from_selection={2287,0,0,0},target_whole_document={2690,0,0,0},text_height={2279,1,1,0},text_width={2276,1,1,7},toggle_caret_sticky={2459,0,0,0},toggle_fold={2231,0,1,0},toggle_fold_show_text={2700,0,1,7},undo={2176,0,0,0},upper_case={2341,0,0,0},use_pop_up={2371,0,1,0},user_list_show={2117,0,1,7},vc_home={2331,0,0,0},vc_home_display={2652,0,0,0},vc_home_display_extend={2653,0,0,0},vc_home_extend={2332,0,0,0},vc_home_rect_extend={2431,0,0,0},vc_home_wrap={2453,0,0,0},vc_home_wrap_extend={2454,0,0,0},vertical_centre_caret={2619,0,0,0},visible_from_doc_line={2220,1,1,0},word_end_position={2267,1,3,5},word_left={2308,0,0,0},word_left_end={2439,0,0,0},word_left_end_extend={2440,0,0,0},word_left_extend={2309,0,0,0},word_part_left={2390,0,0,0},word_part_left_extend={2391,0,0,0},word_part_right={2392,0,0,0},word_part_right_extend={2393,0,0,0},word_right={2310,0,0,0},word_right_end={2441,0,0,0},word_right_end_extend={2442,0,0,0},word_right_extend={2311,0,0,0},word_start_position={2266,1,3,5},wrap_count={2235,1,1,0},zoom_in={2333,0,0,0},zoom_out={2334,0,0,0},}
+M.functions = {add_ref_document={2376,0,0,1},add_selection={2573,0,3,3},add_styled_text={2002,0,2,9},add_tab_stop={2676,0,1,1},add_text={2001,0,2,7},add_undo_action={2560,0,1,1},allocate={2446,0,1,0},allocate_extended_styles={2553,1,1,0},allocate_sub_styles={4020,1,1,1},annotation_clear_all={2547,0,0,0},append_text={2282,0,2,7},assign_cmd_key={2070,0,6,1},auto_c_active={2102,5,0,0},auto_c_cancel={2101,0,0,0},auto_c_complete={2104,0,0,0},auto_c_pos_start={2103,3,0,0},auto_c_select={2108,0,0,7},auto_c_show={2100,0,1,7},auto_c_stops={2105,0,0,7},back_tab={2328,0,0,0},begin_undo_action={2078,0,0,0},brace_bad_light={2352,0,3,0},brace_bad_light_indicator={2499,0,5,1},brace_highlight={2351,0,3,3},brace_highlight_indicator={2498,0,5,1},brace_match={2353,3,3,1},call_tip_active={2202,5,0,0},call_tip_cancel={2201,0,0,0},call_tip_pos_start={2203,3,0,0},call_tip_set_hlt={2204,0,1,1},call_tip_show={2200,0,3,7},can_paste={2173,5,0,0},can_redo={2016,5,0,0},can_undo={2174,5,0,0},cancel={2325,0,0,0},change_insertion={2672,0,2,7},change_lexer_state={2617,1,3,3},char_left={2304,0,0,0},char_left_extend={2305,0,0,0},char_left_rect_extend={2428,0,0,0},char_position_from_point={2561,3,1,1},char_position_from_point_close={2562,3,1,1},char_right={2306,0,0,0},char_right_extend={2307,0,0,0},char_right_rect_extend={2429,0,0,0},choose_caret_x={2399,0,0,0},clear={2180,0,0,0},clear_all={2004,0,0,0},clear_all_cmd_keys={2072,0,0,0},clear_cmd_key={2071,0,6,0},clear_document_style={2005,0,0,0},clear_registered_images={2408,0,0,0},clear_representation={2667,0,7,0},clear_selections={2571,0,0,0},clear_tab_stops={2675,0,1,0},colourise={4003,0,3,3},contracted_fold_next={2618,1,1,0},convert_eols={2029,0,1,0},copy={2178,0,0,0},copy_allow_line={2519,0,0,0},copy_range={2419,0,3,3},copy_text={2420,0,2,7},count_characters={2633,1,3,3},create_document={2375,1,0,0},create_loader={2632,1,1,0},cut={2177,0,0,0},del_line_left={2395,0,0,0},del_line_right={2396,0,0,0},del_word_left={2335,0,0,0},del_word_right={2336,0,0,0},del_word_right_end={2518,0,0,0},delete_back={2326,0,0,0},delete_back_not_line={2344,0,0,0},delete_range={2645,0,3,1},describe_key_word_sets={4017,1,0,8},describe_property={4016,1,7,8},doc_line_from_visible={2221,1,1,0},document_end={2318,0,0,0},document_end_extend={2319,0,0,0},document_start={2316,0,0,0},document_start_extend={2317,0,0,0},drop_selection_n={2671,0,1,0},edit_toggle_overtype={2324,0,0,0},empty_undo_buffer={2175,0,0,0},encoded_from_utf8={2449,1,7,8},end_undo_action={2079,0,0,0},ensure_visible={2232,0,1,0},ensure_visible_enforce_policy={2234,0,1,0},expand_children={2239,0,1,1},find_column={2456,1,1,1},find_indicator_flash={2641,0,3,3},find_indicator_hide={2642,0,0,0},find_indicator_show={2640,0,3,3},find_text={2150,3,1,11},fold_all={2662,0,1,0},fold_children={2238,0,1,1},fold_line={2237,0,1,1},form_feed={2330,0,0,0},format_range={2151,3,5,12},free_sub_styles={4023,0,0,0},get_cur_line={2027,1,2,8},get_hotspot_active_back={2495,4,0,0},get_hotspot_active_fore={2494,4,0,0},get_last_child={2224,1,1,1},get_line={2153,1,1,8},get_line_sel_end_position={2425,3,1,0},get_line_sel_start_position={2424,3,1,0},get_next_tab_stop={2677,1,1,1},get_sel_text={2161,1,0,8},get_styled_text={2015,1,0,10},get_text={2182,1,2,8},get_text_range={2162,1,0,10},goto_line={2024,0,1,0},goto_pos={2025,0,3,0},grab_focus={2400,0,0,0},hide_lines={2227,0,1,1},hide_selection={2163,0,5,0},home={2312,0,0,0},home_display={2345,0,0,0},home_display_extend={2346,0,0,0},home_extend={2313,0,0,0},home_rect_extend={2430,0,0,0},home_wrap={2349,0,0,0},home_wrap_extend={2450,0,0,0},indicator_all_on_for={2506,1,3,0},indicator_clear_range={2505,0,3,1},indicator_end={2509,1,1,3},indicator_fill_range={2504,0,3,1},indicator_start={2508,1,1,3},indicator_value_at={2507,1,1,3},insert_text={2003,0,3,7},is_range_word={2691,5,3,3},line_copy={2455,0,0,0},line_cut={2337,0,0,0},line_delete={2338,0,0,0},line_down={2300,0,0,0},line_down_extend={2301,0,0,0},line_down_rect_extend={2426,0,0,0},line_duplicate={2404,0,0,0},line_end={2314,0,0,0},line_end_display={2347,0,0,0},line_end_display_extend={2348,0,0,0},line_end_extend={2315,0,0,0},line_end_rect_extend={2432,0,0,0},line_end_wrap={2451,0,0,0},line_end_wrap_extend={2452,0,0,0},line_from_position={2166,1,3,0},line_length={2350,1,1,0},line_scroll={2168,0,1,1},line_scroll_down={2342,0,0,0},line_scroll_up={2343,0,0,0},line_transpose={2339,0,0,0},line_up={2302,0,0,0},line_up_extend={2303,0,0,0},line_up_rect_extend={2427,0,0,0},lines_join={2288,0,0,0},lines_split={2289,0,1,0},load_lexer_library={4007,0,0,7},lower_case={2340,0,0,0},margin_text_clear_all={2536,0,0,0},marker_add={2043,1,1,1},marker_add_set={2466,0,1,1},marker_define={2040,0,1,1},marker_define_pixmap={2049,0,1,7},marker_define_rgba_image={2626,0,1,7},marker_delete={2044,0,1,1},marker_delete_all={2045,0,1,0},marker_delete_handle={2018,0,1,0},marker_enable_highlight={2293,0,5,0},marker_get={2046,1,1,0},marker_line_from_handle={2017,1,1,0},marker_next={2047,1,1,1},marker_previous={2048,1,1,1},marker_symbol_defined={2529,1,1,0},move_caret_inside_view={2401,0,0,0},move_selected_lines_down={2621,0,0,0},move_selected_lines_up={2620,0,0,0},multi_edge_add_line={2694,0,1,4},multi_edge_clear_all={2695,0,0,0},multiple_select_add_each={2689,0,0,0},multiple_select_add_next={2688,0,0,0},new_line={2329,0,0,0},null={2172,0,0,0},page_down={2322,0,0,0},page_down_extend={2323,0,0,0},page_down_rect_extend={2434,0,0,0},page_up={2320,0,0,0},page_up_extend={2321,0,0,0},page_up_rect_extend={2433,0,0,0},para_down={2413,0,0,0},para_down_extend={2414,0,0,0},para_up={2415,0,0,0},para_up_extend={2416,0,0,0},paste={2179,0,0,0},point_x_from_position={2164,1,0,3},point_y_from_position={2165,1,0,3},position_after={2418,3,3,0},position_before={2417,3,3,0},position_from_line={2167,3,1,0},position_from_point={2022,3,1,1},position_from_point_close={2023,3,1,1},position_relative={2670,3,3,1},private_lexer_call={4013,1,1,1},property_names={4014,1,0,8},property_type={4015,1,7,0},redo={2011,0,0,0},register_image={2405,0,1,7},register_rgba_image={2627,0,1,7},release_all_extended_styles={2552,0,0,0},release_document={2377,0,0,1},replace_sel={2170,0,0,7},replace_target={2194,1,2,7},replace_target_re={2195,1,2,7},rotate_selection={2606,0,0,0},scroll_caret={2169,0,0,0},scroll_range={2569,0,3,3},scroll_to_end={2629,0,0,0},scroll_to_start={2628,0,0,0},search_anchor={2366,0,0,0},search_in_target={2197,1,2,7},search_next={2367,1,1,7},search_prev={2368,1,1,7},select_all={2013,0,0,0},selection_duplicate={2469,0,0,0},set_chars_default={2444,0,0,0},set_empty_selection={2556,0,3,0},set_fold_margin_colour={2290,0,5,4},set_fold_margin_hi_colour={2291,0,5,4},set_hotspot_active_back={2411,0,5,4},set_hotspot_active_fore={2410,0,5,4},set_length_for_encode={2448,0,1,0},set_save_point={2014,0,0,0},set_sel={2160,0,3,3},set_sel_back={2068,0,5,4},set_sel_fore={2067,0,5,4},set_selection={2572,0,3,3},set_styling={2033,0,2,1},set_styling_ex={2073,0,2,7},set_target_range={2686,0,3,3},set_text={2181,0,0,7},set_visible_policy={2394,0,1,1},set_whitespace_back={2085,0,5,4},set_whitespace_fore={2084,0,5,4},set_x_caret_policy={2402,0,1,1},set_y_caret_policy={2403,0,1,1},show_lines={2226,0,1,1},start_record={3001,0,0,0},start_styling={2032,0,3,1},stop_record={3002,0,0,0},stuttered_page_down={2437,0,0,0},stuttered_page_down_extend={2438,0,0,0},stuttered_page_up={2435,0,0,0},stuttered_page_up_extend={2436,0,0,0},style_clear_all={2050,0,0,0},style_reset_default={2058,0,0,0},swap_main_anchor_caret={2607,0,0,0},tab={2327,0,0,0},target_as_utf8={2447,1,0,8},target_from_selection={2287,0,0,0},target_whole_document={2690,0,0,0},text_height={2279,1,1,0},text_width={2276,1,1,7},toggle_caret_sticky={2459,0,0,0},toggle_fold={2231,0,1,0},toggle_fold_show_text={2700,0,1,7},undo={2176,0,0,0},upper_case={2341,0,0,0},use_pop_up={2371,0,1,0},user_list_show={2117,0,1,7},vc_home={2331,0,0,0},vc_home_display={2652,0,0,0},vc_home_display_extend={2653,0,0,0},vc_home_extend={2332,0,0,0},vc_home_rect_extend={2431,0,0,0},vc_home_wrap={2453,0,0,0},vc_home_wrap_extend={2454,0,0,0},vertical_centre_caret={2619,0,0,0},visible_from_doc_line={2220,1,1,0},word_end_position={2267,1,3,5},word_left={2308,0,0,0},word_left_end={2439,0,0,0},word_left_end_extend={2440,0,0,0},word_left_extend={2309,0,0,0},word_part_left={2390,0,0,0},word_part_left_extend={2391,0,0,0},word_part_right={2392,0,0,0},word_part_right_extend={2393,0,0,0},word_right={2310,0,0,0},word_right_end={2441,0,0,0},word_right_end_extend={2442,0,0,0},word_right_extend={2311,0,0,0},word_start_position={2266,1,3,5},wrap_count={2235,1,1,0},zoom_in={2333,0,0,0},zoom_out={2334,0,0,0},}
---
-- Map of Scintilla property names to table values containing their "get"
@@ -41,7 +41,7 @@ M.functions = {add_ref_document={2376,0,0,1},add_selection={2573,1,3,3},add_styl
-- @see functions
-- @class table
-- @name properties
-M.properties = {additional_caret_fore={2605,2604,4,0},additional_carets_blink={2568,2567,5,0},additional_carets_visible={2609,2608,5,0},additional_sel_alpha={2603,2602,1,0},additional_sel_back={0,2601,4,0},additional_sel_fore={0,2600,4,0},additional_selection_typing={2566,2565,5,0},all_lines_visible={2236,0,5,0},anchor={2009,2026,3,0},annotation_lines={2546,0,1,1},annotation_style={2543,2542,1,1},annotation_style_offset={2551,2550,1,0},annotation_styles={2545,2544,8,1},annotation_text={2541,2540,8,1},annotation_visible={2549,2548,1,0},auto_c_auto_hide={2119,2118,5,0},auto_c_cancel_at_start={2111,2110,5,0},auto_c_case_insensitive_behaviour={2635,2634,1,0},auto_c_choose_single={2114,2113,5,0},auto_c_current={2445,0,1,0},auto_c_current_text={2610,0,8,0},auto_c_drop_rest_of_word={2271,2270,5,0},auto_c_fill_ups={0,2112,7,0},auto_c_ignore_case={2116,2115,5,0},auto_c_max_height={2211,2210,1,0},auto_c_max_width={2209,2208,1,0},auto_c_multi={2637,2636,1,0},auto_c_order={2661,2660,1,0},auto_c_separator={2107,2106,1,0},auto_c_type_separator={2285,2286,1,0},automatic_fold={2664,2663,1,0},back_space_un_indents={2263,2262,5,0},buffered_draw={2034,2035,5,0},call_tip_back={0,2205,4,0},call_tip_fore={0,2206,4,0},call_tip_fore_hlt={0,2207,4,0},call_tip_pos_start={0,2214,1,0},call_tip_position={0,2213,5,0},call_tip_use_style={0,2212,1,0},caret_fore={2138,2069,4,0},caret_line_back={2097,2098,4,0},caret_line_back_alpha={2471,2470,1,0},caret_line_visible={2095,2096,5,0},caret_line_visible_always={2654,2655,5,0},caret_period={2075,2076,1,0},caret_sticky={2457,2458,1,0},caret_style={2513,2512,1,0},caret_width={2189,2188,1,0},char_at={2007,0,1,3},character_pointer={2520,0,1,0},code_page={2137,2037,1,0},column={2129,0,1,3},control_char_symbol={2389,2388,1,0},current_pos={2008,2141,3,0},cursor={2387,2386,1,0},direct_function={2184,0,1,0},direct_pointer={2185,0,1,0},distance_to_secondary_styles={4025,0,1,0},doc_pointer={2357,2358,1,0},edge_colour={2364,2365,4,0},edge_column={2360,2361,1,0},edge_mode={2362,2363,1,0},end_at_last_line={2278,2277,5,0},end_styled={2028,0,3,0},eol_mode={2030,2031,1,0},extra_ascent={2526,2525,1,0},extra_descent={2528,2527,1,0},first_visible_line={2152,2613,1,0},focus={2381,2380,5,0},fold_display_text_style={0,2701,1,0},fold_expanded={2230,2229,5,1},fold_flags={0,2233,1,0},fold_level={2223,2222,1,1},fold_parent={2225,0,1,1},font_quality={2612,2611,1,0},gap_position={2644,0,3,0},h_scroll_bar={2131,2130,5,0},highlight_guide={2135,2134,1,0},hotspot_active_underline={2496,2412,5,0},hotspot_single_line={2497,2421,5,0},identifier={2623,2622,1,0},identifiers={0,4024,7,1},idle_styling={2693,2692,1,0},ime_interaction={2678,2679,1,0},indent={2123,2122,1,0},indentation_guides={2133,2132,1,0},indic_alpha={2524,2523,1,1},indic_flags={2685,2684,1,1},indic_fore={2083,2082,4,1},indic_hover_fore={2683,2682,4,1},indic_hover_style={2681,2680,1,1},indic_outline_alpha={2559,2558,1,1},indic_style={2081,2080,1,1},indic_under={2511,2510,5,1},indicator_current={2501,2500,1,0},indicator_value={2503,2502,1,0},key_words={0,4005,7,1},layout_cache={2273,2272,1,0},length={2006,0,1,0},lexer={4002,4001,1,0},lexer_language={4012,4006,8,0},line_count={2154,0,1,0},line_end_position={2136,0,3,1},line_end_types_active={2658,0,1,0},line_end_types_allowed={2657,2656,1,0},line_end_types_supported={4018,0,1,0},line_indent_position={2128,0,3,1},line_indentation={2127,2126,1,1},line_state={2093,2092,1,1},line_visible={2228,0,5,1},lines_on_screen={2370,0,1,0},main_selection={2575,2574,1,0},margin_back_n={2251,2250,4,1},margin_cursor_n={2249,2248,1,1},margin_left={2156,2155,1,0},margin_mask_n={2245,2244,1,1},margin_options={2557,2539,1,0},margin_right={2158,2157,1,0},margin_sensitive_n={2247,2246,5,1},margin_style={2533,2532,1,1},margin_style_offset={2538,2537,1,0},margin_styles={2535,2534,8,1},margin_text={2531,2530,8,1},margin_type_n={2241,2240,1,1},margin_width_n={2243,2242,1,1},margins={2253,2252,1,0},marker_alpha={0,2476,1,1},marker_back={0,2042,4,1},marker_back_selected={0,2292,4,1},marker_fore={0,2041,4,1},max_line_state={2094,0,1,0},mod_event_mask={2378,2359,1,0},modify={2159,0,5,0},mouse_down_captures={2385,2384,5,0},mouse_dwell_time={2265,2264,1,0},mouse_selection_rectangular_switch={2669,2668,5,0},mouse_wheel_captures={2697,2696,5,0},multi_paste={2615,2614,1,0},multiple_selection={2564,2563,5,0},overtype={2187,2186,5,0},paste_convert_endings={2468,2467,5,0},phases_draw={2673,2674,1,0},position_cache={2515,2514,1,0},primary_style_from_style={4028,0,1,1},print_colour_mode={2149,2148,1,0},print_magnification={2147,2146,1,0},print_wrap_mode={2407,2406,1,0},property={4008,4004,8,7},property_expanded={4009,0,8,7},property_int={4010,0,1,7},punctuation_chars={2649,2648,8,0},range_pointer={2643,0,1,3},read_only={2140,2171,5,0},rectangular_selection_anchor={2591,2590,3,0},rectangular_selection_anchor_virtual_space={2595,2594,1,0},rectangular_selection_caret={2589,2588,3,0},rectangular_selection_caret_virtual_space={2593,2592,1,0},rectangular_selection_modifier={2599,2598,1,0},representation={2666,2665,8,7},rgba_image_height={0,2625,1,0},rgba_image_scale={0,2651,1,0},rgba_image_width={0,2624,1,0},scroll_width={2275,2274,1,0},scroll_width_tracking={2517,2516,5,0},search_flags={2199,2198,1,0},sel_alpha={2477,2478,1,0},sel_eol_filled={2479,2480,5,0},selection_empty={2650,0,5,0},selection_end={2145,2144,3,0},selection_is_rectangle={2372,0,5,0},selection_mode={2423,2422,1,0},selection_n_anchor={2579,2578,3,1},selection_n_anchor_virtual_space={2583,2582,1,1},selection_n_caret={2577,2576,3,1},selection_n_caret_virtual_space={2581,2580,1,1},selection_n_end={2587,2586,3,1},selection_n_start={2585,2584,3,1},selection_start={2143,2142,3,0},selections={2570,0,1,0},status={2383,2382,1,0},style_at={2010,0,1,3},style_back={2482,2052,4,1},style_bits={2091,2090,1,0},style_bits_needed={4011,0,1,0},style_bold={2483,2053,5,1},style_case={2489,2060,1,1},style_changeable={2492,2099,5,1},style_character_set={2490,2066,1,1},style_eol_filled={2487,2057,5,1},style_font={2486,2056,8,1},style_fore={2481,2051,4,1},style_from_sub_style={4027,0,1,1},style_hot_spot={2493,2409,5,1},style_italic={2484,2054,5,1},style_size={2485,2055,1,1},style_size_fractional={2062,2061,1,1},style_underline={2488,2059,5,1},style_visible={2491,2074,5,1},style_weight={2064,2063,1,1},sub_style_bases={4026,0,8,0},sub_styles_length={4022,0,1,1},sub_styles_start={4021,0,1,1},tab_draw_mode={2698,2699,1,0},tab_indents={2261,2260,5,0},tab_width={2121,2036,1,0},tag={2616,0,8,1},target_end={2193,2192,3,0},target_start={2191,2190,3,0},target_text={2687,0,8,0},technology={2631,2630,1,0},text_length={2183,0,1,0},two_phase_draw={2283,2284,5,0},undo_collection={2019,2012,5,0},use_tabs={2125,2124,5,0},v_scroll_bar={2281,2280,5,0},view_eol={2355,2356,5,0},view_ws={2020,2021,1,0},virtual_space_options={2597,2596,1,0},whitespace_chars={2647,2443,8,0},whitespace_size={2087,2086,1,0},word_chars={2646,2077,8,0},wrap_indent_mode={2473,2472,1,0},wrap_mode={2269,2268,1,0},wrap_start_indent={2465,2464,1,0},wrap_visual_flags={2461,2460,1,0},wrap_visual_flags_location={2463,2462,1,0},x_offset={2398,2397,1,0},zoom={2374,2373,1,0},}
+M.properties = {accessibility={2703,2702,1,0},additional_caret_fore={2605,2604,4,0},additional_carets_blink={2568,2567,5,0},additional_carets_visible={2609,2608,5,0},additional_sel_alpha={2603,2602,1,0},additional_sel_back={0,2601,4,0},additional_sel_fore={0,2600,4,0},additional_selection_typing={2566,2565,5,0},all_lines_visible={2236,0,5,0},anchor={2009,2026,3,0},annotation_lines={2546,0,1,1},annotation_style={2543,2542,1,1},annotation_style_offset={2551,2550,1,0},annotation_styles={2545,2544,8,1},annotation_text={2541,2540,8,1},annotation_visible={2549,2548,1,0},auto_c_auto_hide={2119,2118,5,0},auto_c_cancel_at_start={2111,2110,5,0},auto_c_case_insensitive_behaviour={2635,2634,1,0},auto_c_choose_single={2114,2113,5,0},auto_c_current={2445,0,1,0},auto_c_current_text={2610,0,8,0},auto_c_drop_rest_of_word={2271,2270,5,0},auto_c_fill_ups={0,2112,7,0},auto_c_ignore_case={2116,2115,5,0},auto_c_max_height={2211,2210,1,0},auto_c_max_width={2209,2208,1,0},auto_c_multi={2637,2636,1,0},auto_c_order={2661,2660,1,0},auto_c_separator={2107,2106,1,0},auto_c_type_separator={2285,2286,1,0},automatic_fold={2664,2663,1,0},back_space_un_indents={2263,2262,5,0},buffered_draw={2034,2035,5,0},call_tip_back={0,2205,4,0},call_tip_fore={0,2206,4,0},call_tip_fore_hlt={0,2207,4,0},call_tip_pos_start={0,2214,1,0},call_tip_position={0,2213,5,0},call_tip_use_style={0,2212,1,0},caret_fore={2138,2069,4,0},caret_line_back={2097,2098,4,0},caret_line_back_alpha={2471,2470,1,0},caret_line_visible={2095,2096,5,0},caret_line_visible_always={2654,2655,5,0},caret_period={2075,2076,1,0},caret_sticky={2457,2458,1,0},caret_style={2513,2512,1,0},caret_width={2189,2188,1,0},char_at={2007,0,1,3},character_pointer={2520,0,1,0},code_page={2137,2037,1,0},column={2129,0,1,3},control_char_symbol={2389,2388,1,0},current_pos={2008,2141,3,0},cursor={2387,2386,1,0},direct_function={2184,0,1,0},direct_pointer={2185,0,1,0},distance_to_secondary_styles={4025,0,1,0},doc_pointer={2357,2358,1,0},edge_colour={2364,2365,4,0},edge_column={2360,2361,1,0},edge_mode={2362,2363,1,0},end_at_last_line={2278,2277,5,0},end_styled={2028,0,3,0},eol_mode={2030,2031,1,0},extra_ascent={2526,2525,1,0},extra_descent={2528,2527,1,0},first_visible_line={2152,2613,1,0},focus={2381,2380,5,0},fold_display_text_style={0,2701,1,0},fold_expanded={2230,2229,5,1},fold_flags={0,2233,1,0},fold_level={2223,2222,1,1},fold_parent={2225,0,1,1},font_quality={2612,2611,1,0},gap_position={2644,0,3,0},h_scroll_bar={2131,2130,5,0},highlight_guide={2135,2134,1,0},hotspot_active_underline={2496,2412,5,0},hotspot_single_line={2497,2421,5,0},identifier={2623,2622,1,0},identifiers={0,4024,7,1},idle_styling={2693,2692,1,0},ime_interaction={2678,2679,1,0},indent={2123,2122,1,0},indentation_guides={2133,2132,1,0},indic_alpha={2524,2523,1,1},indic_flags={2685,2684,1,1},indic_fore={2083,2082,4,1},indic_hover_fore={2683,2682,4,1},indic_hover_style={2681,2680,1,1},indic_outline_alpha={2559,2558,1,1},indic_style={2081,2080,1,1},indic_under={2511,2510,5,1},indicator_current={2501,2500,1,0},indicator_value={2503,2502,1,0},key_words={0,4005,7,1},layout_cache={2273,2272,1,0},length={2006,0,1,0},lexer={4002,4001,1,0},lexer_language={4012,4006,8,0},line_count={2154,0,1,0},line_end_position={2136,0,3,1},line_end_types_active={2658,0,1,0},line_end_types_allowed={2657,2656,1,0},line_end_types_supported={4018,0,1,0},line_indent_position={2128,0,3,1},line_indentation={2127,2126,1,1},line_state={2093,2092,1,1},line_visible={2228,0,5,1},lines_on_screen={2370,0,1,0},main_selection={2575,2574,1,0},margin_back_n={2251,2250,4,1},margin_cursor_n={2249,2248,1,1},margin_left={2156,2155,1,0},margin_mask_n={2245,2244,1,1},margin_options={2557,2539,1,0},margin_right={2158,2157,1,0},margin_sensitive_n={2247,2246,5,1},margin_style={2533,2532,1,1},margin_style_offset={2538,2537,1,0},margin_styles={2535,2534,8,1},margin_text={2531,2530,8,1},margin_type_n={2241,2240,1,1},margin_width_n={2243,2242,1,1},margins={2253,2252,1,0},marker_alpha={0,2476,1,1},marker_back={0,2042,4,1},marker_back_selected={0,2292,4,1},marker_fore={0,2041,4,1},max_line_state={2094,0,1,0},mod_event_mask={2378,2359,1,0},modify={2159,0,5,0},mouse_down_captures={2385,2384,5,0},mouse_dwell_time={2265,2264,1,0},mouse_selection_rectangular_switch={2669,2668,5,0},mouse_wheel_captures={2697,2696,5,0},multi_paste={2615,2614,1,0},multiple_selection={2564,2563,5,0},overtype={2187,2186,5,0},paste_convert_endings={2468,2467,5,0},phases_draw={2673,2674,1,0},position_cache={2515,2514,1,0},primary_style_from_style={4028,0,1,1},print_colour_mode={2149,2148,1,0},print_magnification={2147,2146,1,0},print_wrap_mode={2407,2406,1,0},property={4008,4004,8,7},property_expanded={4009,0,8,7},property_int={4010,0,1,7},punctuation_chars={2649,2648,8,0},range_pointer={2643,0,1,3},read_only={2140,2171,5,0},rectangular_selection_anchor={2591,2590,3,0},rectangular_selection_anchor_virtual_space={2595,2594,1,0},rectangular_selection_caret={2589,2588,3,0},rectangular_selection_caret_virtual_space={2593,2592,1,0},rectangular_selection_modifier={2599,2598,1,0},representation={2666,2665,8,7},rgba_image_height={0,2625,1,0},rgba_image_scale={0,2651,1,0},rgba_image_width={0,2624,1,0},scroll_width={2275,2274,1,0},scroll_width_tracking={2517,2516,5,0},search_flags={2199,2198,1,0},sel_alpha={2477,2478,1,0},sel_eol_filled={2479,2480,5,0},selection_empty={2650,0,5,0},selection_end={2145,2144,3,0},selection_is_rectangle={2372,0,5,0},selection_mode={2423,2422,1,0},selection_n_anchor={2579,2578,3,1},selection_n_anchor_virtual_space={2583,2582,1,1},selection_n_caret={2577,2576,3,1},selection_n_caret_virtual_space={2581,2580,1,1},selection_n_end={2587,2586,3,1},selection_n_start={2585,2584,3,1},selection_start={2143,2142,3,0},selections={2570,0,1,0},status={2383,2382,1,0},style_at={2010,0,1,3},style_back={2482,2052,4,1},style_bits={2091,2090,1,0},style_bits_needed={4011,0,1,0},style_bold={2483,2053,5,1},style_case={2489,2060,1,1},style_changeable={2492,2099,5,1},style_character_set={2490,2066,1,1},style_eol_filled={2487,2057,5,1},style_font={2486,2056,8,1},style_fore={2481,2051,4,1},style_from_sub_style={4027,0,1,1},style_hot_spot={2493,2409,5,1},style_italic={2484,2054,5,1},style_size={2485,2055,1,1},style_size_fractional={2062,2061,1,1},style_underline={2488,2059,5,1},style_visible={2491,2074,5,1},style_weight={2064,2063,1,1},sub_style_bases={4026,0,8,0},sub_styles_length={4022,0,1,1},sub_styles_start={4021,0,1,1},tab_draw_mode={2698,2699,1,0},tab_indents={2261,2260,5,0},tab_width={2121,2036,1,0},tag={2616,0,8,1},target_end={2193,2192,3,0},target_start={2191,2190,3,0},target_text={2687,0,8,0},technology={2631,2630,1,0},text_length={2183,0,1,0},two_phase_draw={2283,2284,5,0},undo_collection={2019,2012,5,0},use_tabs={2125,2124,5,0},v_scroll_bar={2281,2280,5,0},view_eol={2355,2356,5,0},view_ws={2020,2021,1,0},virtual_space_options={2597,2596,1,0},whitespace_chars={2647,2443,8,0},whitespace_size={2087,2086,1,0},word_chars={2646,2077,8,0},wrap_indent_mode={2473,2472,1,0},wrap_mode={2269,2268,1,0},wrap_start_indent={2465,2464,1,0},wrap_visual_flags={2461,2460,1,0},wrap_visual_flags_location={2463,2462,1,0},x_offset={2398,2397,1,0},zoom={2374,2373,1,0},}
local marker_number, indic_number, list_type, image_type = -1, -1, 0, 0
diff --git a/properties.lua b/properties.lua
index e06a9422..4374162c 100644
--- a/properties.lua
+++ b/properties.lua
@@ -179,3 +179,6 @@ buffer.wrap_mode = buffer.WRAP_NONE
-- buffer.edge_mode = not CURSES and buffer.EDGE_LINE or buffer.EDGE_BACKGROUND
-- buffer.edge_column = 80
--end
+
+-- Accessibility.
+buffer.accessibility = buffer.ACCESSIBILITY_DISABLED
diff --git a/src/Makefile b/src/Makefile
index fa5f3e16..f0c7fc36 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -425,10 +425,15 @@ bombay_zip = bombay.zip
cloc = cloc-1.60.pl
$(scintilla_tgz): ; wget http://prdownloads.sourceforge.net/scintilla/$@ -O $@
-scintilla: scintilla.patch | $(scintilla_tgz)
- if [ -d $@ ]; then rm -r $@; fi
- mkdir $@ && tar xzf $| -C $@ && mv $@/*/* $@
- patch -d $@ -N -p1 < $<
+scintilla: $(wildcard scintilla_backports/*.patch) scintilla.patch | \
+ $(scintilla_tgz)
+ if [ -d $@/.hg ]; then \
+ hg --cwd $@ update -C -r rel-3-7-3; \
+ else \
+ if [ -d $@ ]; then rm -r $@; fi; \
+ mkdir $@ && tar xzf $| -C $@ && mv $@/*/* $@; \
+ fi
+ for patch in $^; do echo Applying $$patch; patch -d $@ -N -p1 < $$patch; done
$(tre_zip): ; wget https://github.com/laurikari/tre/archive/$@ -O $@
tre: tre.patch | $(tre_zip)
if [ -d $@ ]; then rm -r $@; fi
diff --git a/src/scintilla.patch b/src/scintilla.patch
index 1f75f400..ac950c56 100644
--- a/src/scintilla.patch
+++ b/src/scintilla.patch
@@ -191,52 +191,3 @@ diff -r bfdfb44eb777 src/Document.cxx
+}
+
+#endif
-diff -r e99b1a2bfbf8 src/Editor.cxx
---- a/src/Editor.cxx Thu Feb 16 08:37:09 2017 +1100
-+++ b/src/Editor.cxx Wed Feb 22 11:37:10 2017 -0500
-@@ -3111,6 +3111,9 @@
- }
-
- void Editor::CursorUpOrDown(int direction, Selection::selTypes selt) {
-+ if ((selt == Selection::noSel) && sel.MoveExtends()) {
-+ selt = Selection::selStream;
-+ }
- SelectionPosition caretToUse = sel.Range(sel.Main()).caret;
- if (sel.IsRectangular()) {
- if (selt == Selection::noSel) {
-diff -r 8cb0c9214098 -r e2523f83af01 gtk/PlatGTK.cxx
---- a/gtk/PlatGTK.cxx Wed Jan 04 09:30:05 2017 +1100
-+++ b/gtk/PlatGTK.cxx Mon Jan 02 11:43:36 2017 +1100
-@@ -1401,7 +1401,7 @@
- #endif
- }
-
--void ListBoxX::Create(Window &parent, int, Point, int, bool, int) {
-+void ListBoxX::Create(Window &, int, Point, int, bool, int) {
- if (widCached != 0) {
- wid = widCached;
- return;
-@@ -1475,10 +1475,6 @@
- gtk_widget_show(widget);
- g_signal_connect(G_OBJECT(widget), "button_press_event",
- G_CALLBACK(ButtonPress), this);
--
-- GtkWidget *top = gtk_widget_get_toplevel(static_cast<GtkWidget *>(parent.GetID()));
-- gtk_window_set_transient_for(GTK_WINDOW(static_cast<GtkWidget *>(wid)),
-- GTK_WINDOW(top));
- }
-
- void ListBoxX::SetFont(Font &scint_font) {
-diff -r 8cb0c9214098 -r e2523f83af01 gtk/ScintillaGTK.cxx
---- a/gtk/ScintillaGTK.cxx Wed Jan 04 09:30:05 2017 +1100
-+++ b/gtk/ScintillaGTK.cxx Mon Jan 02 11:43:36 2017 +1100
-@@ -1301,9 +1301,6 @@
- G_CALLBACK(ScintillaGTK::PressCT), static_cast<void *>(this));
- gtk_widget_set_events(widcdrw,
- GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
-- GtkWidget *top = gtk_widget_get_toplevel(static_cast<GtkWidget *>(wMain.GetID()));
-- gtk_window_set_transient_for(GTK_WINDOW(static_cast<GtkWidget *>(PWidget(ct.wCallTip))),
-- GTK_WINDOW(top));
- }
- gtk_widget_set_size_request(PWidget(ct.wDraw), rc.Width(), rc.Height());
- ct.wDraw.Show();
diff --git a/src/scintilla_backports/6095_ae52e0c68190.patch b/src/scintilla_backports/6095_ae52e0c68190.patch
new file mode 100644
index 00000000..f30f40dc
--- /dev/null
+++ b/src/scintilla_backports/6095_ae52e0c68190.patch
@@ -0,0 +1,43 @@
+# HG changeset patch
+# User Colomban Wendling <ban@herbesfolles.org>
+# Date 1487714930 -3600
+# Node ID ae52e0c68190d423505624ae1d26e442e015d48f
+# Parent 966f25e2241058f45500025b0a8e8ed4cae10ee7
+Bug [#1901]. GTK: Fix double scrolling under X11
+
+Really restrict smooth scrolling handling to Wayland.
+
+diff -r 966f25e22410 -r ae52e0c68190 doc/ScintillaHistory.html
+--- a/doc/ScintillaHistory.html Sun Feb 19 14:13:46 2017 +1100
++++ b/doc/ScintillaHistory.html Tue Feb 21 23:08:50 2017 +0100
+@@ -520,6 +520,18 @@
+ </li>
+ </ul>
+ <h3>
++ <a href="http://www.scintilla.org/scite374.zip">Release 3.7.4</a>
++ </h3>
++ <ul>
++ <li>
++ Released 19 February 2017.
++ </li>
++ <li>
++ Fix to prevent double scrolling on GTK+ with X11.
++ <a href="http://sourceforge.net/p/scintilla/bugs/1901/">Bug #1901</a>.
++ </li>
++ </ul>
++ <h3>
+ <a href="http://www.scintilla.org/scite373.zip">Release 3.7.3</a>
+ </h3>
+ <ul>
+diff -r 966f25e22410 -r ae52e0c68190 gtk/ScintillaGTK.cxx
+--- a/gtk/ScintillaGTK.cxx Sun Feb 19 14:13:46 2017 +1100
++++ b/gtk/ScintillaGTK.cxx Tue Feb 21 23:08:50 2017 +0100
+@@ -1801,7 +1801,7 @@
+ return FALSE;
+
+ #if defined(GDK_WINDOWING_WAYLAND)
+- if (event->direction == GDK_SCROLL_SMOOTH) {
++ if (event->direction == GDK_SCROLL_SMOOTH && GDK_IS_WAYLAND_WINDOW(event->window)) {
+ const int smoothScrollFactor = 4;
+ sciThis->smoothScrollY += event->delta_y * smoothScrollFactor;
+ sciThis->smoothScrollX += event->delta_x * smoothScrollFactor;;
diff --git a/src/scintilla_backports/6097_7f22895eaddb.patch b/src/scintilla_backports/6097_7f22895eaddb.patch
new file mode 100644
index 00000000..2ffe1923
--- /dev/null
+++ b/src/scintilla_backports/6097_7f22895eaddb.patch
@@ -0,0 +1,34 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1487827984 -39600
+# Node ID 7f22895eaddb6584d488ed2e606d5d0e930db22c
+# Parent cc79ed8e4f8274ba1242150f36e2ab0b40ed68f4
+Bug [#1905]. Fix stream selection mode when moving caret up or down.
+
+diff -r cc79ed8e4f82 -r 7f22895eaddb doc/ScintillaHistory.html
+--- a/doc/ScintillaHistory.html Wed Feb 22 16:35:01 2017 +1100
++++ b/doc/ScintillaHistory.html Thu Feb 23 16:33:04 2017 +1100
+@@ -527,6 +527,10 @@
+ Released 19 February 2017.
+ </li>
+ <li>
++ Fix to stream selection mode when moving caret up or down.
++ <a href="http://sourceforge.net/p/scintilla/bugs/1905/">Bug #1905</a>.
++ </li>
++ <li>
+ Fix to prevent double scrolling on GTK+ with X11.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1901/">Bug #1901</a>.
+ </li>
+diff -r cc79ed8e4f82 -r 7f22895eaddb src/Editor.cxx
+--- a/src/Editor.cxx Wed Feb 22 16:35:01 2017 +1100
++++ b/src/Editor.cxx Thu Feb 23 16:33:04 2017 +1100
+@@ -3111,6 +3111,9 @@
+ }
+
+ void Editor::CursorUpOrDown(int direction, Selection::selTypes selt) {
++ if ((selt == Selection::noSel) && sel.MoveExtends()) {
++ selt = Selection::selStream;
++ }
+ SelectionPosition caretToUse = sel.Range(sel.Main()).caret;
+ if (sel.IsRectangular()) {
+ if (selt == Selection::noSel) {
diff --git a/src/scintilla_backports/6099_809112c81196.patch b/src/scintilla_backports/6099_809112c81196.patch
new file mode 100644
index 00000000..2a10245d
--- /dev/null
+++ b/src/scintilla_backports/6099_809112c81196.patch
@@ -0,0 +1,45 @@
+# HG changeset patch
+# User Colomban Wendling <ban@herbesfolles.org>
+# Date 1488136706 -3600
+# Node ID 809112c8119696afcefdcb145e04ade832fcbe0b
+# Parent 4d2ba76f394abe85ce97ae7037db34bdae452dd1
+Bug [#1907]. GTK: Fix crash after destroying the widget on GTK < 3.3.6
+
+On GTK2 and GTK3 < 3.3.6 there is no GtkAccessibleClass::widget_unset()
+method, so we can't destroy our accessible object right away. So, to
+avoid accessing a destroyed widget, we need to check whether the widget
+still exists in the the ScintillaGTKAccessible destructor.
+
+In other methods it's not necessary because the wrapping GObject class
+makes sure not to forward other when the widget has been destroyed, but
+we still have to destroy the C++ instance no matter what, so the check
+has to be on this side.
+
+diff -r 4d2ba76f394a -r 809112c81196 doc/ScintillaHistory.html
+--- a/doc/ScintillaHistory.html Sat Feb 25 09:13:40 2017 +1100
++++ b/doc/ScintillaHistory.html Sun Feb 26 20:18:26 2017 +0100
+@@ -535,6 +535,10 @@
+ <a href="http://sourceforge.net/p/scintilla/bugs/1915/">Bug #1915</a>.
+ </li>
+ <li>
++ Fix crash in accessibility code on GTK+ &lt; 3.3.6 caused by previous bug fix.
++ <a href="http://sourceforge.net/p/scintilla/bugs/1907/">Bug #1907</a>.
++ </li>
++ <li>
+ Fix to prevent double scrolling on GTK+ with X11.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1901/">Bug #1901</a>.
+ </li>
+diff -r 4d2ba76f394a -r 809112c81196 gtk/ScintillaGTKAccessible.cxx
+--- a/gtk/ScintillaGTKAccessible.cxx Sat Feb 25 09:13:40 2017 +1100
++++ b/gtk/ScintillaGTKAccessible.cxx Sun Feb 26 20:18:26 2017 +0100
+@@ -162,7 +162,9 @@
+ }
+
+ ScintillaGTKAccessible::~ScintillaGTKAccessible() {
+- g_signal_handlers_disconnect_matched(sci->sci, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, this);
++ if (gtk_accessible_get_widget(accessible)) {
++ g_signal_handlers_disconnect_matched(sci->sci, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, this);
++ }
+ }
+
+ gchar *ScintillaGTKAccessible::GetTextRangeUTF8(Position startByte, Position endByte) {
diff --git a/src/scintilla_backports/6101_b82fe8d33961.patch b/src/scintilla_backports/6101_b82fe8d33961.patch
new file mode 100644
index 00000000..e60f610f
--- /dev/null
+++ b/src/scintilla_backports/6101_b82fe8d33961.patch
@@ -0,0 +1,94 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1488408061 -39600
+# Node ID b82fe8d33961050a7905d6588eef858b85ca804c
+# Parent 29534cb8eafb48f9eacc574b8063e9d66520ae8a
+Fix potential problems with IME on Cocoa when document contains invalid UTF-8.
+
+diff -r 29534cb8eafb -r b82fe8d33961 cocoa/ScintillaCocoa.h
+--- a/cocoa/ScintillaCocoa.h Thu Mar 02 09:08:04 2017 +1100
++++ b/cocoa/ScintillaCocoa.h Thu Mar 02 09:41:01 2017 +1100
+@@ -48,6 +48,7 @@
+ #include "CaseFolder.h"
+ #include "Document.h"
+ #include "CaseConvert.h"
++#include "UniConversion.h"
+ #include "Selection.h"
+ #include "PositionCache.h"
+ #include "EditModel.h"
+diff -r 29534cb8eafb -r b82fe8d33961 cocoa/ScintillaView.mm
+--- a/cocoa/ScintillaView.mm Thu Mar 02 09:08:04 2017 +1100
++++ b/cocoa/ScintillaView.mm Thu Mar 02 09:41:01 2017 +1100
+@@ -437,6 +437,7 @@
+ [mOwner message: SCI_SETTARGETRANGE wParam: posRange.location lParam: NSMaxRange(posRange)];
+ std::string text([mOwner message: SCI_TARGETASUTF8] + 1, 0);
+ [mOwner message: SCI_TARGETASUTF8 wParam: 0 lParam: reinterpret_cast<sptr_t>(&text[0])];
++ text = FixInvalidUTF8(text);
+ NSString *result = [NSString stringWithUTF8String: text.c_str()];
+ NSMutableAttributedString *asResult = [[[NSMutableAttributedString alloc] initWithString:result] autorelease];
+
+diff -r 29534cb8eafb -r b82fe8d33961 doc/ScintillaHistory.html
+--- a/doc/ScintillaHistory.html Thu Mar 02 09:08:04 2017 +1100
++++ b/doc/ScintillaHistory.html Thu Mar 02 09:41:01 2017 +1100
+@@ -537,6 +537,10 @@
+ <a href="http://sourceforge.net/p/scintilla/bugs/1881/">Bug #1881</a>.
+ </li>
+ <li>
++ Fix potential problems with IME on Cocoa when document contains invalid
++ UTF-8.
++ </li>
++ <li>
+ Fix crash on Cocoa with OS X 10.9 due to accessibility API not available.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1915/">Bug #1915</a>.
+ </li>
+diff -r 29534cb8eafb -r b82fe8d33961 src/UniConversion.cxx
+--- a/src/UniConversion.cxx Thu Mar 02 09:08:04 2017 +1100
++++ b/src/UniConversion.cxx Thu Mar 02 09:41:01 2017 +1100
+@@ -8,6 +8,7 @@
+ #include <stdlib.h>
+
+ #include <stdexcept>
++#include <string>
+
+ #include "UniConversion.h"
+
+@@ -304,6 +305,28 @@
+ return (utf8StatusNext & UTF8MaskInvalid) ? 1 : (utf8StatusNext & UTF8MaskWidth);
+ }
+
++// Replace invalid bytes in UTF-8 with the replacement character
++std::string FixInvalidUTF8(const std::string &text) {
++ std::string result;
++ const unsigned char *us = reinterpret_cast<const unsigned char *>(text.c_str());
++ size_t remaining = text.size();
++ while (remaining > 0) {
++ const int utf8Status = UTF8Classify(us, static_cast<int>(remaining));
++ if (utf8Status & UTF8MaskInvalid) {
++ // Replacement character 0xFFFD = UTF8:"efbfbd".
++ result.append("\xef\xbf\xbd");
++ us++;
++ remaining--;
++ } else {
++ const int len = utf8Status&UTF8MaskWidth;
++ result.append(reinterpret_cast<const char *>(us), len);
++ us += len;
++ remaining -= len;
++ }
++ }
++ return result;
++}
++
+ #ifdef SCI_NAMESPACE
+ }
+ #endif
+diff -r 29534cb8eafb -r b82fe8d33961 src/UniConversion.h
+--- a/src/UniConversion.h Thu Mar 02 09:08:04 2017 +1100
++++ b/src/UniConversion.h Thu Mar 02 09:41:01 2017 +1100
+@@ -23,6 +23,7 @@
+ size_t UTF16FromUTF8(const char *s, size_t len, wchar_t *tbuf, size_t tlen);
+ unsigned int UTF32FromUTF8(const char *s, unsigned int len, unsigned int *tbuf, unsigned int tlen);
+ unsigned int UTF16FromUTF32Character(unsigned int val, wchar_t *tbuf);
++std::string FixInvalidUTF8(const std::string &text);
+
+ extern int UTF8BytesOfLead[256];
+ void UTF8BytesOfLeadInitialise();
diff --git a/src/scintilla_backports/6102_e12538e52567.patch b/src/scintilla_backports/6102_e12538e52567.patch
new file mode 100644
index 00000000..4078bf5f
--- /dev/null
+++ b/src/scintilla_backports/6102_e12538e52567.patch
@@ -0,0 +1,61 @@
+# HG changeset patch
+# User Colomban Wendling <ban@herbesfolles.org>
+# Date 1487712605 -3600
+# Node ID e12538e52567bc5fc011448f42689ac52434f1fd
+# Parent b82fe8d33961050a7905d6588eef858b85ca804c
+Bug [#1910]. GTK a11y: Speed up converting byte offsets to character offsets
+
+Use a per-line cache to avoid re-computing the offset from the start of
+the buffer each time. This dramatically speeds up multiple replacements
+on large files.
+
+diff -r b82fe8d33961 -r e12538e52567 gtk/ScintillaGTKAccessible.cxx
+--- a/gtk/ScintillaGTKAccessible.cxx Thu Mar 02 09:41:01 2017 +1100
++++ b/gtk/ScintillaGTKAccessible.cxx Tue Feb 21 22:30:05 2017 +0100
+@@ -856,6 +856,13 @@
+ void ScintillaGTKAccessible::Notify(GtkWidget *, gint, SCNotification *nt) {
+ switch (nt->nmhdr.code) {
+ case SCN_MODIFIED: {
++ if (nt->modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) {
++ // invalidate character offset cache if applicable
++ const Position line = sci->pdoc->LineFromPosition(nt->position);
++ if (character_offsets.size() > static_cast<size_t>(line + 1)) {
++ character_offsets.resize(line + 1);
++ }
++ }
+ if (nt->modificationType & SC_MOD_INSERTTEXT) {
+ int startChar = CharacterOffsetFromByteOffset(nt->position);
+ int lengthChar = sci->pdoc->CountCharacters(nt->position, nt->position + nt->length);
+diff -r b82fe8d33961 -r e12538e52567 gtk/ScintillaGTKAccessible.h
+--- a/gtk/ScintillaGTKAccessible.h Thu Mar 02 09:41:01 2017 +1100
++++ b/gtk/ScintillaGTKAccessible.h Tue Feb 21 22:30:05 2017 +0100
+@@ -20,6 +20,9 @@
+ GtkAccessible *accessible;
+ ScintillaGTK *sci;
+
++ // cache holding character offset for each line start, see CharacterOffsetFromByteOffset()
++ std::vector<Position> character_offsets;
++
+ // cached length of the deletion, in characters (see Notify())
+ int deletionLengthChar;
+ // local state for comparing
+@@ -52,7 +55,18 @@
+ }
+
+ int CharacterOffsetFromByteOffset(Position byteOffset) {
+- return sci->pdoc->CountCharacters(0, byteOffset);
++ const Position line = sci->pdoc->LineFromPosition(byteOffset);
++ if (character_offsets.size() <= static_cast<size_t>(line)) {
++ if (character_offsets.empty())
++ character_offsets.push_back(0);
++ for (Position i = character_offsets.size(); i <= line; i++) {
++ const Position start = sci->pdoc->LineStart(i - 1);
++ const Position end = sci->pdoc->LineStart(i);
++ character_offsets.push_back(character_offsets[i - 1] + sci->pdoc->CountCharacters(start, end));
++ }
++ }
++ const Position lineStart = sci->pdoc->LineStart(line);
++ return character_offsets[line] + sci->pdoc->CountCharacters(lineStart, byteOffset);
+ }
+
+ void CharacterRangeFromByteRange(Position startByte, Position endByte, int *startChar, int *endChar) {
diff --git a/src/scintilla_backports/6108_b833c0659497.patch b/src/scintilla_backports/6108_b833c0659497.patch
new file mode 100644
index 00000000..b38d426a
--- /dev/null
+++ b/src/scintilla_backports/6108_b833c0659497.patch
@@ -0,0 +1,74 @@
+# HG changeset patch
+# User Neil Hodgson <nyamatongwe@gmail.com>
+# Date 1488583798 -39600
+# Node ID b833c0659497438d3638a1a30ef4c604123f9e3e
+# Parent d4f7d1439daa636ffe50cec516667627e04174a7
+Fix minor issues in interface definitions.
+
+diff -r d4f7d1439daa -r b833c0659497 include/Scintilla.iface
+--- a/include/Scintilla.iface Sat Mar 04 10:28:39 2017 +1100
++++ b/include/Scintilla.iface Sat Mar 04 10:29:58 2017 +1100
+@@ -415,8 +415,7 @@
+ # How many margins are there?.
+ get int GetMargins=2253(,)
+
+-# Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles.
+-# Style 39 is for future use.
++# Styles in range 32..39 are predefined for parts of the UI and are not used as normal styles.
+ enu StylesCommon=STYLE_
+ val STYLE_DEFAULT=32
+ val STYLE_LINENUMBER=33
+@@ -1215,7 +1214,7 @@
+ # Switch a header line between expanded and contracted and show some text after the line.
+ fun void ToggleFoldShowText=2700(int line, string text)
+
+-enu foldDisplayTextStyle=SC_FOLDDISPLAYTEXTSTYLE_
++enu FoldDisplayTextStyle=SC_FOLDDISPLAYTEXT_
+ val SC_FOLDDISPLAYTEXT_HIDDEN=0
+ val SC_FOLDDISPLAYTEXT_STANDARD=1
+ val SC_FOLDDISPLAYTEXT_BOXED=2
+@@ -1832,6 +1831,7 @@
+ fun void WordPartRightExtend=2393(,)
+
+ # Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.
++enu VisiblePolicy=VISIBLE_
+ val VISIBLE_SLOP=0x01
+ val VISIBLE_STRICT=0x04
+ # Set the way the display area is determined when a particular line
+@@ -1844,8 +1844,10 @@
+ # Delete forwards from the current position to the end of the line.
+ fun void DelLineRight=2396(,)
+
+-# Get and Set the xOffset (ie, horizontal scroll position).
++# Set the xOffset (ie, horizontal scroll position).
+ set void SetXOffset=2397(int xOffset,)
++
++# Get the xOffset (ie, horizontal scroll position).
+ get int GetXOffset=2398(,)
+
+ # Set the last x chosen value to be the caret x position.
+@@ -2117,6 +2119,7 @@
+ # Duplicate the selection. If selection empty duplicate the line containing the caret.
+ fun void SelectionDuplicate=2469(,)
+
++enu Alpha=SC_ALPHA_
+ val SC_ALPHA_TRANSPARENT=0
+ val SC_ALPHA_OPAQUE=255
+ val SC_ALPHA_NOALPHA=256
+@@ -2515,6 +2518,7 @@
+ # Scroll to end of document.
+ fun void ScrollToEnd=2629(,)
+
++enu Technology=SC_TECHNOLOGY_
+ val SC_TECHNOLOGY_DEFAULT=0
+ val SC_TECHNOLOGY_DIRECTWRITE=1
+ val SC_TECHNOLOGY_DIRECTWRITERETAIN=2
+@@ -4811,7 +4815,7 @@
+ evt void MarginClick=2010(int modifiers, int position, int margin)
+ evt void NeedShown=2011(int position, int length)
+ evt void Painted=2013(void)
+-evt void UserListSelection=2014(int listType, string text, int positionint, int ch, CompletionMethods listCompletionMethod)
++evt void UserListSelection=2014(int listType, string text, int position, int ch, CompletionMethods listCompletionMethod)
+ evt void URIDropped=2015(string text)
+ evt void DwellStart=2016(int position, int x, int y)
+ evt void DwellEnd=2017(int position, int x, int y)
diff --git a/src/scintilla_backports/6111_225f39cfd931.patch b/src/scintilla_backports/6111_225f39cfd931.patch
new file mode 100644
index 00000000..29caca6d
--- /dev/null
+++ b/src/scintilla_backports/6111_225f39cfd931.patch
@@ -0,0 +1,101 @@
+# HG changeset patch
+# User johnsonj
+# Date 1488691711 -39600
+# Node ID 225f39cfd93159c37966d50db15db7fdb894a503
+# Parent a3894ee30cdba2c1ced617f80bc6eb900e5cbb42
+For IMEs, do not clear selected text when there is no composition text to show.
+
+diff -r a3894ee30cdb -r 225f39cfd931 doc/ScintillaHistory.html
+--- a/doc/ScintillaHistory.html Sat Mar 04 14:32:28 2017 +1100
++++ b/doc/ScintillaHistory.html Sun Mar 05 16:28:31 2017 +1100
+@@ -527,6 +527,9 @@
+ Released 19 February 2017.
+ </li>
+ <li>
++ For IMEs, do not clear selected text when there is no composition text to show.
++ </li>
++ <li>
+ Fix to stream selection mode when moving caret up or down.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1905/">Bug #1905</a>.
+ </li>
+diff -r a3894ee30cdb -r 225f39cfd931 gtk/ScintillaGTK.cxx
+--- a/gtk/ScintillaGTK.cxx Sat Mar 04 14:32:28 2017 +1100
++++ b/gtk/ScintillaGTK.cxx Sun Mar 05 16:28:31 2017 +1100
+@@ -2323,12 +2323,13 @@
+
+ view.imeCaretBlockOverride = false; // If backspace.
+
++ bool initialCompose = false;
+ if (pdoc->TentativeActive()) {
+ pdoc->TentativeUndo();
+ } else {
+ // No tentative undo means start of this composition so
+ // fill in any virtual spaces.
+- ClearBeforeTentativeStart();
++ initialCompose = true;
+ }
+
+ PreEditString preeditStr(im_context);
+@@ -2345,6 +2346,8 @@
+ return;
+ }
+
++ if (initialCompose)
++ ClearBeforeTentativeStart();
+ pdoc->TentativeStart(); // TentativeActive() from now on
+
+ std::vector<int> indicator = MapImeIndicators(preeditStr.attrs, preeditStr.str);
+diff -r a3894ee30cdb -r 225f39cfd931 qt/ScintillaEditBase/ScintillaEditBase.cpp
+--- a/qt/ScintillaEditBase/ScintillaEditBase.cpp Sat Mar 04 14:32:28 2017 +1100
++++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp Sun Mar 05 16:28:31 2017 +1100
+@@ -525,12 +525,13 @@
+ return;
+ }
+
++ bool initialCompose = false;
+ if (sqt->pdoc->TentativeActive()) {
+ sqt->pdoc->TentativeUndo();
+ } else {
+ // No tentative undo means start of this composition so
+ // Fill in any virtual spaces.
+- sqt->ClearBeforeTentativeStart();
++ initialCompose = true;
+ }
+
+ sqt->view.imeCaretBlockOverride = false;
+@@ -557,6 +558,8 @@
+ return;
+ }
+
++ if (initialCompose)
++ sqt->ClearBeforeTentativeStart();
+ sqt->pdoc->TentativeStart(); // TentativeActive() from now on.
+
+ std::vector<int> imeIndicator = MapImeIndicators(event);
+diff -r a3894ee30cdb -r 225f39cfd931 win32/ScintillaWin.cxx
+--- a/win32/ScintillaWin.cxx Sat Mar 04 14:32:28 2017 +1100
++++ b/win32/ScintillaWin.cxx Sun Mar 05 16:28:31 2017 +1100
+@@ -1061,12 +1061,13 @@
+ return 0;
+ }
+
++ bool initialCompose = false;
+ if (pdoc->TentativeActive()) {
+ pdoc->TentativeUndo();
+ } else {
+ // No tentative undo means start of this composition so
+ // fill in any virtual spaces.
+- ClearBeforeTentativeStart();
++ initialCompose = true;
+ }
+
+ view.imeCaretBlockOverride = false;
+@@ -1078,6 +1079,8 @@
+ return 0;
+ }
+
++ if (initialCompose)
++ ClearBeforeTentativeStart();
+ pdoc->TentativeStart(); // TentativeActive from now on.
+
+ std::vector<int> imeIndicator = MapImeIndicators(imc.GetImeAttributes());
diff --git a/src/scintilla_backports/6116_6c62b379a52e.patch b/src/scintilla_backports/6116_6c62b379a52e.patch
new file mode 100644
index 00000000..c4637e88
--- /dev/null
+++ b/src/scintilla_backports/6116_6c62b379a52e.patch
@@ -0,0 +1,59 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1488862473 -39600
+# Node ID 6c62b379a52e1d4a2feda80bcec9b352f120dcb6
+# Parent 313a4618efd5ac735a669f923293f296c0e90886
+Avoid potential problems with memcmp reading past end of object.
+
+diff -r 313a4618efd5 -r 6c62b379a52e lexers/LexErrorList.cxx
+--- a/lexers/LexErrorList.cxx Tue Mar 07 12:05:15 2017 +1100
++++ b/lexers/LexErrorList.cxx Tue Mar 07 15:54:33 2017 +1100
+@@ -106,7 +106,8 @@
+ // perl error message:
+ // <message> at <file> line <line>
+ return SCE_ERR_PERL;
+- } else if ((memcmp(lineBuffer, " at ", 6) == 0) &&
++ } else if ((lengthLine >= 6) &&
++ (memcmp(lineBuffer, " at ", 6) == 0) &&
+ strstr(lineBuffer, ":line ")) {
+ // A .NET traceback
+ return SCE_ERR_NET;
+diff -r 313a4618efd5 -r 6c62b379a52e src/Document.cxx
+--- a/src/Document.cxx Tue Mar 07 12:05:15 2017 +1100
++++ b/src/Document.cxx Tue Mar 07 15:54:33 2017 +1100
+@@ -1887,7 +1887,7 @@
+ }
+ } else if (SC_CP_UTF8 == dbcsCodePage) {
+ const size_t maxFoldingExpansion = 4;
+- std::vector<char> searchThing(lengthFind * UTF8MaxBytes * maxFoldingExpansion + 1);
++ std::vector<char> searchThing((lengthFind+1) * UTF8MaxBytes * maxFoldingExpansion + 1);
+ const int lenSearch = static_cast<int>(
+ pcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind));
+ char bytes[UTF8MaxBytes + 1];
+@@ -1914,6 +1914,8 @@
+ break;
+ const int lenFlat = static_cast<int>(pcf->Fold(folded, sizeof(folded), bytes, widthChar));
+ folded[lenFlat] = 0;
++ // memcmp may examine lenFlat bytes in both arguments so assert it doesn't read past end of searchThing
++ assert(static_cast<size_t>(indexSearch + lenFlat) <= searchThing.size());
+ // Does folded match the buffer
+ characterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat);
+ if (!characterMatches)
+@@ -1939,7 +1941,7 @@
+ } else if (dbcsCodePage) {
+ const size_t maxBytesCharacter = 2;
+ const size_t maxFoldingExpansion = 4;
+- std::vector<char> searchThing(lengthFind * maxBytesCharacter * maxFoldingExpansion + 1);
++ std::vector<char> searchThing((lengthFind+1) * maxBytesCharacter * maxFoldingExpansion + 1);
+ const int lenSearch = static_cast<int>(
+ pcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind));
+ while (forward ? (pos < endPos) : (pos >= endPos)) {
+@@ -1959,6 +1961,8 @@
+ char folded[maxBytesCharacter * maxFoldingExpansion + 1];
+ const int lenFlat = static_cast<int>(pcf->Fold(folded, sizeof(folded), bytes, widthChar));
+ folded[lenFlat] = 0;
++ // memcmp may examine lenFlat bytes in both arguments so assert it doesn't read past end of searchThing
++ assert(static_cast<size_t>(indexSearch + lenFlat) <= searchThing.size());
+ // Does folded match the buffer
+ characterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat);
+ indexDocument += widthChar;
diff --git a/src/scintilla_backports/6117_23546875480b.patch b/src/scintilla_backports/6117_23546875480b.patch
new file mode 100644
index 00000000..bd0057ac
--- /dev/null
+++ b/src/scintilla_backports/6117_23546875480b.patch
@@ -0,0 +1,313 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1488885645 -39600
+# Node ID 23546875480b1ee4a3f309c738f64166a0409a46
+# Parent 6c62b379a52e1d4a2feda80bcec9b352f120dcb6
+Bug [#1910]. Accessibility support may be queried and, on GTK+, disabled.
+
+diff -r 6c62b379a52e -r 23546875480b cocoa/ScintillaCocoa.mm
+--- a/cocoa/ScintillaCocoa.mm Tue Mar 07 15:54:33 2017 +1100
++++ b/cocoa/ScintillaCocoa.mm Tue Mar 07 22:20:45 2017 +1100
+@@ -906,6 +906,9 @@
+ return r;
+ }
+
++ case SCI_GETACCESSIBILITY:
++ return SC_ACCESSIBILITY_ENABLED;
++
+ default:
+ sptr_t r = ScintillaBase::WndProc(iMessage, wParam, lParam);
+
+diff -r 6c62b379a52e -r 23546875480b doc/ScintillaDoc.html
+--- a/doc/ScintillaDoc.html Tue Mar 07 15:54:33 2017 +1100
++++ b/doc/ScintillaDoc.html Tue Mar 07 22:20:45 2017 +1100
+@@ -367,17 +367,17 @@
+ <tr>
+ <td>&cir; <a class="toc" href="#LongLines">Long lines</a></td>
+
++ <td>&cir; <a class="toc" href="#Accessibility">Accessibility</a></td>
++
+ <td>&cir; <a class="toc" href="#Lexer">Lexer</a></td>
+
++ </tr>
++
++ <tr>
+ <td>&cir; <a class="toc" href="#LexerObjects">Lexer objects</a></td>
+
+- </tr>
+-
+- <tr>
+ <td>&cir; <a class="toc" href="#Notifications">Notifications</a></td>
+
+- <td>&cir; <a class="toc" href="#Accessibility">Accessibility</a></td>
+-
+ <td>&cir; <a class="toc" href="#Images">Images</a></td>
+
+ </tr>
+@@ -6511,6 +6511,60 @@
+ of a space character in <code>STYLE_DEFAULT</code>. All the edges can be cleared with
+ <code>SCI_MULTIEDGECLEARALL</code>.</p>
+
++ <h2 id="Accessibility">Accessibility</h2>
++
++ <p>Scintilla supports some platform accessibility features.
++ This support differs between platforms.
++ On GTK+ and Cocoa the platform accessibility APIs are implemented sufficiently to
++ make screen readers work.
++ On Win32, the system caret is manipulated to help screen readers.
++ </p>
++
++ <code><a class="message" href="#SCI_SETACCESSIBILITY">SCI_SETACCESSIBILITY(int accessibility)</a><br />
++ <a class="message" href="#SCI_GETACCESSIBILITY">SCI_GETACCESSIBILITY &rarr; int</a><br />
++ </code>
++
++ <p><b id="SCI_SETACCESSIBILITY">SCI_SETACCESSIBILITY(int accessibility)</b><br />
++ <b id="SCI_GETACCESSIBILITY">SCI_GETACCESSIBILITY &rarr; int</b><br />
++ These messages may enable or disable accessibility and report its current status.</p>
++
++ <p>On most platforms, accessibility is either implemented or not implemented and this can be
++ discovered with <code>SCI_GETACCESSIBILITY</code> with
++ <code>SCI_SETACCESSIBILITY</code> performing no action.
++ On GTK+, there are storage and performance costs to accessibility, so it can be disabled
++ by calling <code>SCI_SETACCESSIBILITY</code>.
++ </p>
++
++ <table class="standard" summary="Accessibility status">
++ <tbody>
++ <tr>
++ <th align="left">Symbol</th>
++
++ <th>Value</th>
++
++ <th align="left">Accessibility status</th>
++ </tr>
++ </tbody>
++
++ <tbody valign="top">
++ <tr>
++ <td align="left"><code>SC_ACCESSIBILITY_DISABLED</code></td>
++
++ <td align="center">0</td>
++
++ <td>Accessibility is disabled.</td>
++ </tr>
++
++ <tr>
++ <td align="left"><code>SC_ACCESSIBILITY_ENABLED</code></td>
++
++ <td align="center">1</td>
++
++ <td>Accessibility is enabled.</td>
++ </tr>
++ </tbody>
++ </table>
++
+ <h2 id="Lexer">Lexer</h2>
+
+ <p>If you define the symbol <code>SCI_LEXER</code> when building Scintilla, (this is sometimes
+@@ -7891,15 +7945,6 @@
+ <a class="jump" href="#SCN_AUTOCSELECTION">SCN_AUTOCSELECTION</a></code>
+ notification.</p>
+
+- <h2 id="Accessibility">Accessibility</h2>
+-
+- <p>Scintilla supports some platform accessibility features.
+- This support differs between platforms.
+- On GTK+ and Cocoa the platform accessibility APIs are implemented sufficiently to
+- make screen readers work.
+- On Win32, the system caret is manipulated to help screen readers.
+- </p>
+-
+ <h2 id="Images">Images</h2>
+
+ <p>Two formats are supported for images used in margin markers and autocompletion lists, RGBA and XPM.</p>
+diff -r 6c62b379a52e -r 23546875480b doc/ScintillaHistory.html
+--- a/doc/ScintillaHistory.html Tue Mar 07 15:54:33 2017 +1100
++++ b/doc/ScintillaHistory.html Tue Mar 07 22:20:45 2017 +1100
+@@ -527,6 +527,10 @@
+ Released 19 February 2017.
+ </li>
+ <li>
++ Accessibility support may be queried with SCI_GETACCESSIBILITY.
++ On GTK+, accessibility may be disabled by calling SCI_SETACCESSIBILITY.
++ </li>
++ <li>
+ Lexer added for "indent" language which is styled as plain text but folded by indentation level.
+ </li>
+ <li>
+diff -r 6c62b379a52e -r 23546875480b gtk/ScintillaGTK.cxx
+--- a/gtk/ScintillaGTK.cxx Tue Mar 07 15:54:33 2017 +1100
++++ b/gtk/ScintillaGTK.cxx Tue Mar 07 22:20:45 2017 +1100
+@@ -175,6 +175,7 @@
+ rgnUpdate(0),
+ repaintFullWindow(false),
+ styleIdleID(0),
++ accessibilityEnabled(SC_ACCESSIBILITY_ENABLED),
+ accessible(0) {
+ sci = sci_;
+ wMain = GTK_WIDGET(sci);
+@@ -875,6 +876,19 @@
+ return ret;
+ }
+
++ case SCI_GETACCESSIBILITY:
++ return accessibilityEnabled;
++
++ case SCI_SETACCESSIBILITY:
++ accessibilityEnabled = wParam;
++ if (accessible) {
++ ScintillaGTKAccessible *sciAccessible = ScintillaGTKAccessible::FromAccessible(accessible);
++ if (sciAccessible) {
++ sciAccessible->SetAccessibility();
++ }
++ }
++ break;
++
+ default:
+ return ScintillaBase::WndProc(iMessage, wParam, lParam);
+ }
+diff -r 6c62b379a52e -r 23546875480b gtk/ScintillaGTK.h
+--- a/gtk/ScintillaGTK.h Tue Mar 07 15:54:33 2017 +1100
++++ b/gtk/ScintillaGTK.h Tue Mar 07 22:20:45 2017 +1100
+@@ -68,6 +68,7 @@
+ bool repaintFullWindow;
+
+ guint styleIdleID;
++ int accessibilityEnabled;
+ AtkObject *accessible;
+
+ // Private so ScintillaGTK objects can not be copied
+diff -r 6c62b379a52e -r 23546875480b gtk/ScintillaGTKAccessible.cxx
+--- a/gtk/ScintillaGTKAccessible.cxx Tue Mar 07 15:54:33 2017 +1100
++++ b/gtk/ScintillaGTKAccessible.cxx Tue Mar 07 22:20:45 2017 +1100
+@@ -788,6 +788,10 @@
+ //~ iface->set_run_attributes = SetRunAttributes;
+ }
+
++bool ScintillaGTKAccessible::Enabled() const {
++ return sci->accessibilityEnabled == SC_ACCESSIBILITY_ENABLED;
++}
++
+ // Callbacks
+
+ void ScintillaGTKAccessible::UpdateCursor() {
+@@ -820,6 +824,10 @@
+ }
+
+ void ScintillaGTKAccessible::ChangeDocument(Document *oldDoc, Document *newDoc) {
++ if (!Enabled()) {
++ return;
++ }
++
+ if (oldDoc == newDoc) {
+ return;
+ }
+@@ -854,7 +862,15 @@
+ #endif
+ }
+
++void ScintillaGTKAccessible::SetAccessibility() {
++ // Called by ScintillaGTK when application has enabled or disabled accessibility
++ character_offsets.resize(0);
++ character_offsets.push_back(0);
++}
++
+ void ScintillaGTKAccessible::Notify(GtkWidget *, gint, SCNotification *nt) {
++ if (!Enabled())
++ return;
+ switch (nt->nmhdr.code) {
+ case SCN_MODIFIED: {
+ if (nt->modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) {
+@@ -864,6 +880,13 @@
+ character_offsets.resize(line + 1);
+ }
+ }
++ if (nt->modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) {
++ // invalidate character offset cache if applicable
++ const Position line = sci->pdoc->LineFromPosition(nt->position);
++ if (character_offsets.size() > static_cast<size_t>(line + 1)) {
++ character_offsets.resize(line + 1);
++ }
++ }
+ if (nt->modificationType & SC_MOD_INSERTTEXT) {
+ int startChar = CharacterOffsetFromByteOffset(nt->position);
+ int lengthChar = sci->pdoc->CountCharacters(nt->position, nt->position + nt->length);
+diff -r 6c62b379a52e -r 23546875480b gtk/ScintillaGTKAccessible.h
+--- a/gtk/ScintillaGTKAccessible.h Tue Mar 07 15:54:33 2017 +1100
++++ b/gtk/ScintillaGTKAccessible.h Tue Mar 07 22:20:45 2017 +1100
+@@ -23,12 +23,16 @@
+ // cache holding character offset for each line start, see CharacterOffsetFromByteOffset()
+ std::vector<Position> character_offsets;
+
++ // cache holding character offset for each line start, see CharacterOffsetFromByteOffset()
++ std::vector<Position> character_offsets;
++
+ // cached length of the deletion, in characters (see Notify())
+ int deletionLengthChar;
+ // local state for comparing
+ Position old_pos;
+ std::vector<SelectionRange> old_sels;
+
++ bool Enabled() const;
+ void UpdateCursor();
+ void Notify(GtkWidget *widget, gint code, SCNotification *nt);
+ static void SciNotify(GtkWidget *widget, gint code, SCNotification *nt, gpointer data) {
+@@ -136,6 +140,7 @@
+ // So ScintillaGTK can notify us
+ void ChangeDocument(Document *oldDoc, Document *newDoc);
+ void NotifyReadOnly();
++ void SetAccessibility();
+
+ // Helper GtkWidget methods
+ static AtkObject *WidgetGetAccessibleImpl(GtkWidget *widget, AtkObject **cache, gpointer widget_parent_class);
+diff -r 6c62b379a52e -r 23546875480b include/Scintilla.h
+--- a/include/Scintilla.h Tue Mar 07 15:54:33 2017 +1100
++++ b/include/Scintilla.h Tue Mar 07 22:20:45 2017 +1100
+@@ -593,6 +593,10 @@
+ #define SCI_LINESSPLIT 2289
+ #define SCI_SETFOLDMARGINCOLOUR 2290
+ #define SCI_SETFOLDMARGINHICOLOUR 2291
++#define SC_ACCESSIBILITY_DISABLED 0
++#define SC_ACCESSIBILITY_ENABLED 1
++#define SCI_SETACCESSIBILITY 2702
++#define SCI_GETACCESSIBILITY 2703
+ #define SCI_LINEDOWN 2300
+ #define SCI_LINEDOWNEXTEND 2301
+ #define SCI_LINEUP 2302
+diff -r 6c62b379a52e -r 23546875480b include/Scintilla.iface
+--- a/include/Scintilla.iface Tue Mar 07 15:54:33 2017 +1100
++++ b/include/Scintilla.iface Tue Mar 07 22:20:45 2017 +1100
+@@ -1476,6 +1476,16 @@
+ # Set the other colour used as a chequerboard pattern in the fold margin
+ fun void SetFoldMarginHiColour=2291(bool useSetting, colour fore)
+
++enu Accessibility=SC_ACCESSIBILITY_
++val SC_ACCESSIBILITY_DISABLED=0
++val SC_ACCESSIBILITY_ENABLED=1
++
++# Enable or disable accessibility.
++set void SetAccessibility=2702(int accessibility,)
++
++# Report accessibility status.
++get int GetAccessibility=2703(,)
++
+ ## New messages go here
+
+ ## Start of key messages
+diff -r 6c62b379a52e -r 23546875480b src/Editor.cxx
+--- a/src/Editor.cxx Tue Mar 07 15:54:33 2017 +1100
++++ b/src/Editor.cxx Tue Mar 07 22:20:45 2017 +1100
+@@ -7554,6 +7554,13 @@
+ std::vector<EdgeProperties>().swap(vs.theMultiEdge); // Free vector and memory, C++03 compatible
+ InvalidateStyleRedraw();
+ break;
++
++ case SCI_GETACCESSIBILITY:
++ return SC_ACCESSIBILITY_DISABLED;
++
++ case SCI_SETACCESSIBILITY:
++ // May be implemented by platform code.
++ break;
+
+ case SCI_GETDOCPOINTER:
+ return reinterpret_cast<sptr_t>(pdoc);
diff --git a/src/scintilla_backports/6118_559dea66606f.patch b/src/scintilla_backports/6118_559dea66606f.patch
new file mode 100644
index 00000000..cb791fc9
--- /dev/null
+++ b/src/scintilla_backports/6118_559dea66606f.patch
@@ -0,0 +1,20 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1488886060 -39600
+# Node ID 559dea66606f42c080f04db706a1ebe6bef83713
+# Parent 23546875480b1ee4a3f309c738f64166a0409a46
+Bug [#1910]. Fixed double declaration.
+
+diff -r 23546875480b -r 559dea66606f gtk/ScintillaGTKAccessible.h
+--- a/gtk/ScintillaGTKAccessible.h Tue Mar 07 22:20:45 2017 +1100
++++ b/gtk/ScintillaGTKAccessible.h Tue Mar 07 22:27:40 2017 +1100
+@@ -23,9 +23,6 @@
+ // cache holding character offset for each line start, see CharacterOffsetFromByteOffset()
+ std::vector<Position> character_offsets;
+
+- // cache holding character offset for each line start, see CharacterOffsetFromByteOffset()
+- std::vector<Position> character_offsets;
+-
+ // cached length of the deletion, in characters (see Notify())
+ int deletionLengthChar;
+ // local state for comparing
diff --git a/src/scintilla_backports/6119_71bee2f06619.patch b/src/scintilla_backports/6119_71bee2f06619.patch
new file mode 100644
index 00000000..693749c7
--- /dev/null
+++ b/src/scintilla_backports/6119_71bee2f06619.patch
@@ -0,0 +1,24 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1488922409 -39600
+# Node ID 71bee2f066197ae012f92de55433700df2bdcd09
+# Parent 559dea66606f42c080f04db706a1ebe6bef83713
+Bug [#1910]. Fixed more duplicate code.
+
+diff -r 559dea66606f -r 71bee2f06619 gtk/ScintillaGTKAccessible.cxx
+--- a/gtk/ScintillaGTKAccessible.cxx Tue Mar 07 22:27:40 2017 +1100
++++ b/gtk/ScintillaGTKAccessible.cxx Wed Mar 08 08:33:29 2017 +1100
+@@ -880,13 +880,6 @@
+ character_offsets.resize(line + 1);
+ }
+ }
+- if (nt->modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) {
+- // invalidate character offset cache if applicable
+- const Position line = sci->pdoc->LineFromPosition(nt->position);
+- if (character_offsets.size() > static_cast<size_t>(line + 1)) {
+- character_offsets.resize(line + 1);
+- }
+- }
+ if (nt->modificationType & SC_MOD_INSERTTEXT) {
+ int startChar = CharacterOffsetFromByteOffset(nt->position);
+ int lengthChar = sci->pdoc->CountCharacters(nt->position, nt->position + nt->length);
diff --git a/src/scintilla_backports/6120_8e0cb37c4972.patch b/src/scintilla_backports/6120_8e0cb37c4972.patch
new file mode 100644
index 00000000..373e1121
--- /dev/null
+++ b/src/scintilla_backports/6120_8e0cb37c4972.patch
@@ -0,0 +1,71 @@
+# HG changeset patch
+# User Colomban Wendling <ban@herbesfolles.org>
+# Date 1488893049 -3600
+# Node ID 8e0cb37c4972cd66b33293b88031acf453685cfd
+# Parent 71bee2f066197ae012f92de55433700df2bdcd09
+GTK: Fix popup positioning on monitors not positioned at 0,0
+
+diff -r 71bee2f06619 -r 8e0cb37c4972 gtk/PlatGTK.cxx
+--- a/gtk/PlatGTK.cxx Wed Mar 08 08:33:29 2017 +1100
++++ b/gtk/PlatGTK.cxx Tue Mar 07 14:24:09 2017 +0100
+@@ -1059,25 +1059,21 @@
+ GdkWindow *wndRelativeTo = WindowFromWidget(PWidget(relativeTo.wid));
+ gdk_window_get_origin(wndRelativeTo, &ox, &oy);
+ ox += rc.left;
+- if (ox < 0)
+- ox = 0;
+ oy += rc.top;
+- if (oy < 0)
+- oy = 0;
+
+- GdkRectangle rcScreen = MonitorRectangleForWidget(PWidget(relativeTo.wid));
++ GdkRectangle rcMonitor = MonitorRectangleForWidget(PWidget(relativeTo.wid));
+
+ /* do some corrections to fit into screen */
+ int sizex = rc.right - rc.left;
+ int sizey = rc.bottom - rc.top;
+- const int screenWidth = rcScreen.width;
+- const int screenHeight = rcScreen.height;
+- if (sizex > screenWidth)
+- ox = 0; /* the best we can do */
+- else if (ox + sizex > screenWidth)
+- ox = screenWidth - sizex;
+- if (oy + sizey > screenHeight)
+- oy = screenHeight - sizey;
++ if (sizex > rcMonitor.width || ox < rcMonitor.x)
++ ox = rcMonitor.x; /* the best we can do */
++ else if (ox + sizex > rcMonitor.x + rcMonitor.width)
++ ox = rcMonitor.x + rcMonitor.width - sizex;
++ if (sizey > rcMonitor.height || oy < rcMonitor.y)
++ oy = rcMonitor.y;
++ else if (oy + sizey > rcMonitor.y + rcMonitor.height)
++ oy = rcMonitor.y + rcMonitor.height - sizey;
+
+ gtk_window_move(GTK_WINDOW(PWidget(wid)), ox, oy);
+
+@@ -1929,20 +1925,18 @@
+ // Rely on GTK+ to do the right thing with positioning
+ gtk_menu_popup_at_pointer(widget, NULL);
+ #else
+- GdkRectangle rcScreen = MonitorRectangleForWidget(PWidget(wnd.GetID()));
+- const int screenWidth = rcScreen.width;
+- const int screenHeight = rcScreen.height;
++ GdkRectangle rcMonitor = MonitorRectangleForWidget(PWidget(wnd.GetID()));
+ GtkRequisition requisition;
+ #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_get_preferred_size(GTK_WIDGET(widget), NULL, &requisition);
+ #else
+ gtk_widget_size_request(GTK_WIDGET(widget), &requisition);
+ #endif
+- if ((pt.x + requisition.width) > screenWidth) {
+- pt.x = screenWidth - requisition.width;
++ if ((pt.x + requisition.width) > rcMonitor.x + rcMonitor.width) {
++ pt.x = rcMonitor.x + rcMonitor.width - requisition.width;
+ }
+- if ((pt.y + requisition.height) > screenHeight) {
+- pt.y = screenHeight - requisition.height;
++ if ((pt.y + requisition.height) > rcMonitor.y + rcMonitor.height) {
++ pt.y = rcMonitor.y + rcMonitor.height - requisition.height;
+ }
+ gtk_menu_popup(widget, NULL, NULL, MenuPositionFunc,
+ GINT_TO_POINTER((static_cast<int>(pt.y) << 16) | static_cast<int>(pt.x)), 0,
diff --git a/src/scintilla_backports/6124_4527b3c217a4.patch b/src/scintilla_backports/6124_4527b3c217a4.patch
new file mode 100644
index 00000000..f439b37e
--- /dev/null
+++ b/src/scintilla_backports/6124_4527b3c217a4.patch
@@ -0,0 +1,43 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1488955608 -39600
+# Node ID 4527b3c217a44e45e4714c2a302f124df7109b2f
+# Parent 0fd4b41bcec612df9a3e8204399d0acde55194ce
+Fix warnings from Visual Studio 2017.
+
+diff -r 0fd4b41bcec6 -r 4527b3c217a4 src/PositionCache.cxx
+--- a/src/PositionCache.cxx Wed Mar 08 16:36:39 2017 +1100
++++ b/src/PositionCache.cxx Wed Mar 08 17:46:48 2017 +1100
+@@ -392,7 +392,7 @@
+ }
+
+ SpecialRepresentations::SpecialRepresentations() {
+- std::fill(startByteHasReprs, startByteHasReprs+0x100, 0);
++ std::fill(startByteHasReprs, startByteHasReprs+0x100, static_cast<short>(0));
+ }
+
+ void SpecialRepresentations::SetRepresentation(const char *charBytes, const char *value) {
+@@ -433,7 +433,7 @@
+
+ void SpecialRepresentations::Clear() {
+ mapReprs.clear();
+- std::fill(startByteHasReprs, startByteHasReprs+0x100, 0);
++ std::fill(startByteHasReprs, startByteHasReprs+0x100, static_cast<short>(0));
+ }
+
+ void BreakFinder::Insert(int val) {
+diff -r 0fd4b41bcec6 -r 4527b3c217a4 src/RESearch.cxx
+--- a/src/RESearch.cxx Wed Mar 08 16:36:39 2017 +1100
++++ b/src/RESearch.cxx Wed Mar 08 17:46:48 2017 +1100
+@@ -256,9 +256,9 @@
+ charClass = charClassTable;
+ sta = NOP; /* status of lastpat */
+ bol = 0;
+- std::fill(bittab, bittab + BITBLK, 0);
++ std::fill(bittab, bittab + BITBLK, static_cast<unsigned char>(0));
+ std::fill(tagstk, tagstk + MAXTAG, 0);
+- std::fill(nfa, nfa + MAXNFA, 0);
++ std::fill(nfa, nfa + MAXNFA, '\0');
+ Clear();
+ }
+
diff --git a/src/scintilla_backports/6131_a78e38849624.patch b/src/scintilla_backports/6131_a78e38849624.patch
new file mode 100644
index 00000000..9fb0f43d
--- /dev/null
+++ b/src/scintilla_backports/6131_a78e38849624.patch
@@ -0,0 +1,56 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1489619799 -39600
+# Node ID a78e38849624fca65cd615da3f976d22db03a48b
+# Parent e8364d5495d60b675717c68f97cc527ab3fc95ee
+Fix use-after-free in fold tags when top line folded then new top line inserted.
+In SparseVector, string inserted at start then NULL inserted at start.
+
+diff -r e8364d5495d6 -r a78e38849624 doc/ScintillaHistory.html
+--- a/doc/ScintillaHistory.html Sat Mar 11 10:41:32 2017 +1100
++++ b/doc/ScintillaHistory.html Thu Mar 16 10:16:39 2017 +1100
+@@ -555,6 +555,9 @@
+ For IMEs, do not clear selected text when there is no composition text to show.
+ </li>
+ <li>
++ Fix to crash with fold tags where line inserted at start.
++ </li>
++ <li>
+ Fix to stream selection mode when moving caret up or down.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1905/">Bug #1905</a>.
+ </li>
+diff -r e8364d5495d6 -r a78e38849624 src/SparseVector.h
+--- a/src/SparseVector.h Sat Mar 11 10:41:32 2017 +1100
++++ b/src/SparseVector.h Thu Mar 16 10:16:39 2017 +1100
+@@ -100,7 +100,8 @@
+ if (partition == 0) {
+ // Inserting at start of document so ensure 0
+ if (valueCurrent != T()) {
+- ClearValue(0);
++ // Since valueCurrent is needed again, should not ClearValue
++ values->SetValueAt(0, T());
+ starts->InsertPartition(1, 0);
+ values->InsertValue(1, 1, valueCurrent);
+ starts->InsertText(0, insertLength);
+diff -r e8364d5495d6 -r a78e38849624 test/unit/testSparseVector.cxx
+--- a/test/unit/testSparseVector.cxx Sat Mar 11 10:41:32 2017 +1100
++++ b/test/unit/testSparseVector.cxx Thu Mar 16 10:16:39 2017 +1100
+@@ -89,6 +89,18 @@
+ st.Check();
+ }
+
++ SECTION("InsertStringAtStartThenInsertSpaceAtStart") {
++ REQUIRE(1 == st.Elements());
++ st.InsertSpace(0, 5);
++ st.SetValueAt(0, "3");
++ REQUIRE(1 == st.Elements());
++ REQUIRE("3----" == Representation(st));
++ st.InsertSpace(0, 1);
++ REQUIRE(2 == st.Elements());
++ REQUIRE("-3----" == Representation(st));
++ st.Check();
++ }
++
+ SECTION("InsertAndDeleteAtEnd") {
+ REQUIRE(1 == st.Elements());
+ st.InsertSpace(0, 5);
diff --git a/src/scintilla_backports/6132_6cf19f2bf214.patch b/src/scintilla_backports/6132_6cf19f2bf214.patch
new file mode 100644
index 00000000..3ef0f6c7
--- /dev/null
+++ b/src/scintilla_backports/6132_6cf19f2bf214.patch
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1489631977 -39600
+# Node ID 6cf19f2bf214b1d1dc0ba05412a6659142c772ec
+# Parent a78e38849624fca65cd615da3f976d22db03a48b
+Fix difference between right of line end and left of fold tag.
+
+diff -r a78e38849624 -r 6cf19f2bf214 src/EditView.cxx
+--- a/src/EditView.cxx Thu Mar 16 10:16:39 2017 +1100
++++ b/src/EditView.cxx Thu Mar 16 13:39:37 2017 +1100
+@@ -1087,7 +1087,7 @@
+
+ const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth;
+ XYPOSITION virtualSpace = model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line)) * spaceWidth;
+- rcSegment.left = xStart + static_cast<XYPOSITION>(ll->positions[ll->numCharsInLine] - subLineStart) + spaceWidth + virtualSpace;
++ rcSegment.left = xStart + static_cast<XYPOSITION>(ll->positions[ll->numCharsInLine] - subLineStart) + virtualSpace + vsDraw.aveCharWidth;
+ rcSegment.right = rcSegment.left + static_cast<XYPOSITION>(widthFoldDisplayText);
+
+ ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret);
diff --git a/src/scintilla_backports/6133_30f1573f17ac.patch b/src/scintilla_backports/6133_30f1573f17ac.patch
new file mode 100644
index 00000000..a69f2c14
--- /dev/null
+++ b/src/scintilla_backports/6133_30f1573f17ac.patch
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1489632019 -39600
+# Node ID 30f1573f17ace82fd1adba69e733c4726f68e867
+# Parent 6cf19f2bf214b1d1dc0ba05412a6659142c772ec
+Fix 1 pixel unpainted as background.
+
+diff -r 6cf19f2bf214 -r 30f1573f17ac src/EditView.cxx
+--- a/src/EditView.cxx Thu Mar 16 13:39:37 2017 +1100
++++ b/src/EditView.cxx Thu Mar 16 13:40:19 2017 +1100
+@@ -1111,7 +1111,7 @@
+
+ // Fill Remainder of the line
+ PRectangle rcRemainder = rcSegment;
+- rcRemainder.left = rcRemainder.right + 1;
++ rcRemainder.left = rcRemainder.right;
+ if (rcRemainder.left < rcLine.left)
+ rcRemainder.left = rcLine.left;
+ rcRemainder.right = rcLine.right;
diff --git a/src/scintilla_backports/6134_0253f113f223.patch b/src/scintilla_backports/6134_0253f113f223.patch
new file mode 100644
index 00000000..aa1ffe61
--- /dev/null
+++ b/src/scintilla_backports/6134_0253f113f223.patch
@@ -0,0 +1,36 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1489704595 -39600
+# Node ID 0253f113f22359c009f415099cf635b2637def1e
+# Parent 30f1573f17ace82fd1adba69e733c4726f68e867
+Round left and right sides of fold text box to ensure within the allocation.
+
+diff -r 30f1573f17ac -r 0253f113f223 src/EditView.cxx
+--- a/src/EditView.cxx Thu Mar 16 13:40:19 2017 +1100
++++ b/src/EditView.cxx Fri Mar 17 09:49:55 2017 +1100
+@@ -1133,14 +1133,17 @@
+ if (phase & drawIndicatorsFore) {
+ if (model.foldDisplayTextStyle == SC_FOLDDISPLAYTEXT_BOXED) {
+ surface->PenColour(textFore);
+- surface->MoveTo(static_cast<int>(rcSegment.left), static_cast<int>(rcSegment.top));
+- surface->LineTo(static_cast<int>(rcSegment.left), static_cast<int>(rcSegment.bottom));
+- surface->MoveTo(static_cast<int>(rcSegment.right), static_cast<int>(rcSegment.top));
+- surface->LineTo(static_cast<int>(rcSegment.right), static_cast<int>(rcSegment.bottom));
+- surface->MoveTo(static_cast<int>(rcSegment.left), static_cast<int>(rcSegment.top));
+- surface->LineTo(static_cast<int>(rcSegment.right), static_cast<int>(rcSegment.top));
+- surface->MoveTo(static_cast<int>(rcSegment.left), static_cast<int>(rcSegment.bottom - 1));
+- surface->LineTo(static_cast<int>(rcSegment.right), static_cast<int>(rcSegment.bottom - 1));
++ PRectangle rcBox = rcSegment;
++ rcBox.left = static_cast<XYPOSITION>(RoundXYPosition(rcSegment.left));
++ rcBox.right = static_cast<XYPOSITION>(RoundXYPosition(rcSegment.right));
++ surface->MoveTo(static_cast<int>(rcBox.left), static_cast<int>(rcBox.top));
++ surface->LineTo(static_cast<int>(rcBox.left), static_cast<int>(rcBox.bottom));
++ surface->MoveTo(static_cast<int>(rcBox.right), static_cast<int>(rcBox.top));
++ surface->LineTo(static_cast<int>(rcBox.right), static_cast<int>(rcBox.bottom));
++ surface->MoveTo(static_cast<int>(rcBox.left), static_cast<int>(rcBox.top));
++ surface->LineTo(static_cast<int>(rcBox.right), static_cast<int>(rcBox.top));
++ surface->MoveTo(static_cast<int>(rcBox.left), static_cast<int>(rcBox.bottom - 1));
++ surface->LineTo(static_cast<int>(rcBox.right), static_cast<int>(rcBox.bottom - 1));
+ }
+ }
+
diff --git a/src/scintilla_backports/6135_34665edc7efd.patch b/src/scintilla_backports/6135_34665edc7efd.patch
new file mode 100644
index 00000000..3f807467
--- /dev/null
+++ b/src/scintilla_backports/6135_34665edc7efd.patch
@@ -0,0 +1,20 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1489632594 -39600
+# Node ID 34665edc7efdd526c62e426bb0f6267f64e156e7
+# Parent 0253f113f22359c009f415099cf635b2637def1e
+For multiphase drawing ensure edges and mark underline drawn over fold tags by
+moving background drawing of fold tags before edge line and mark underline.
+
+diff -r 0253f113f223 -r 34665edc7efd src/EditView.cxx
+--- a/src/EditView.cxx Fri Mar 17 09:49:55 2017 +1100
++++ b/src/EditView.cxx Thu Mar 16 13:49:54 2017 +1100
+@@ -1849,6 +1849,8 @@
+ if ((phasesDraw != phasesOne) && (phase & drawBack)) {
+ DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart,
+ subLine, background);
++ DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, drawBack);
++ phase = static_cast<DrawPhase>(phase & ~drawBack);
+ DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end,
+ xStart, subLine, subLineStart, background);
+ }
diff --git a/src/scintilla_backports/6136_2b25287311d0.patch b/src/scintilla_backports/6136_2b25287311d0.patch
new file mode 100644
index 00000000..cea704d2
--- /dev/null
+++ b/src/scintilla_backports/6136_2b25287311d0.patch
@@ -0,0 +1,43 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1489633459 -39600
+# Node ID 2b25287311d015ecc9971c101f0f40ae00c8ca4e
+# Parent 34665edc7efdd526c62e426bb0f6267f64e156e7
+For single phase drawing ensure edges and mark underline drawn over fold tags by
+moving drawing of edge line and mark underline after fold tags.
+
+diff -r 34665edc7efd -r 2b25287311d0 src/EditView.cxx
+--- a/src/EditView.cxx Thu Mar 16 13:49:54 2017 +1100
++++ b/src/EditView.cxx Thu Mar 16 14:04:19 2017 +1100
+@@ -1857,8 +1857,10 @@
+
+ if (phase & drawIndicatorsBack) {
+ DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, true, model.hoverIndicatorPos);
+- DrawEdgeLine(surface, vsDraw, ll, rcLine, lineRange, xStart);
+- DrawMarkUnderline(surface, model, vsDraw, line, rcLine);
++ if (phasesDraw != phasesOne) {
++ DrawEdgeLine(surface, vsDraw, ll, rcLine, lineRange, xStart);
++ DrawMarkUnderline(surface, model, vsDraw, line, rcLine);
++ }
+ }
+
+ if (phase & drawText) {
+@@ -1874,14 +1876,15 @@
+ DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, false, model.hoverIndicatorPos);
+ }
+
+- // End of the drawing of the current line
++ DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, phase);
++
+ if (phasesDraw == phasesOne) {
+ DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end,
+ xStart, subLine, subLineStart, background);
++ DrawEdgeLine(surface, vsDraw, ll, rcLine, lineRange, xStart);
++ DrawMarkUnderline(surface, model, vsDraw, line, rcLine);
+ }
+
+- DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, phase);
+-
+ if (!hideSelection && (phase & drawSelectionTranslucent)) {
+ DrawTranslucentSelection(surface, model, vsDraw, ll, line, rcLine, subLine, lineRange, xStart);
+ }
diff --git a/src/scintilla_backports/6137_c3bba4a9193e.patch b/src/scintilla_backports/6137_c3bba4a9193e.patch
new file mode 100644
index 00000000..d87dec5c
--- /dev/null
+++ b/src/scintilla_backports/6137_c3bba4a9193e.patch
@@ -0,0 +1,20 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1489633522 -39600
+# Node ID c3bba4a9193ea55175c309109e5bab8c87f2a0bd
+# Parent 2b25287311d015ecc9971c101f0f40ae00c8ca4e
+For single phase drawing ensure remainder of line filled by always filling
+in tag fold drawing.
+
+diff -r 2b25287311d0 -r c3bba4a9193e src/EditView.cxx
+--- a/src/EditView.cxx Thu Mar 16 14:04:19 2017 +1100
++++ b/src/EditView.cxx Thu Mar 16 14:05:22 2017 +1100
+@@ -1106,7 +1106,7 @@
+ }
+ }
+
+- if ((phasesDraw != phasesOne) && (phase & drawBack)) {
++ if (phase & drawBack) {
+ surface->FillRectangle(rcSegment, textBack);
+
+ // Fill Remainder of the line
diff --git a/src/scintilla_backports/6138_55368b05bb72.patch b/src/scintilla_backports/6138_55368b05bb72.patch
new file mode 100644
index 00000000..7d6d4519
--- /dev/null
+++ b/src/scintilla_backports/6138_55368b05bb72.patch
@@ -0,0 +1,40 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1489925352 -39600
+# Node ID 55368b05bb72a05862c4ffb6cb01a1ce70f64c0f
+# Parent c3bba4a9193ea55175c309109e5bab8c87f2a0bd
+Group non-single-phase drawing before text.
+
+diff -r c3bba4a9193e -r 55368b05bb72 src/EditView.cxx
+--- a/src/EditView.cxx Thu Mar 16 14:05:22 2017 +1100
++++ b/src/EditView.cxx Sun Mar 19 23:09:12 2017 +1100
+@@ -1846,18 +1846,18 @@
+ xStart += static_cast<int>(ll->wrapIndent);
+ }
+
+- if ((phasesDraw != phasesOne) && (phase & drawBack)) {
+- DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart,
+- subLine, background);
+- DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, drawBack);
+- phase = static_cast<DrawPhase>(phase & ~drawBack);
+- DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end,
+- xStart, subLine, subLineStart, background);
+- }
++ if (phasesDraw != phasesOne) {
++ if (phase & drawBack) {
++ DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart,
++ subLine, background);
++ DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, drawBack);
++ phase = static_cast<DrawPhase>(phase & ~drawBack); // Remove drawBack to not draw again in DrawFoldDisplayText
++ DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end,
++ xStart, subLine, subLineStart, background);
++ }
+
+- if (phase & drawIndicatorsBack) {
+- DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, true, model.hoverIndicatorPos);
+- if (phasesDraw != phasesOne) {
++ if (phase & drawIndicatorsBack) {
++ DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, true, model.hoverIndicatorPos);
+ DrawEdgeLine(surface, vsDraw, ll, rcLine, lineRange, xStart);
+ DrawMarkUnderline(surface, model, vsDraw, line, rcLine);
+ }