aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2022-02-15 22:04:46 -0500
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2022-02-15 22:04:46 -0500
commit70a4fe3fc0163fc90dcd55de962ad99bac237790 (patch)
tree745a95605231e52bb20099662b17f1c8dff74f1a
parent95089e36d221a1f870916b5aa5acd5b7274d8444 (diff)
Updated to Scintilla 5.2.0.
-rw-r--r--core/.buffer.luadoc1
-rw-r--r--core/iface.lua2
-rw-r--r--init.lua1
-rw-r--r--src/Makefile4
-rw-r--r--src/scintilla.patch62
-rw-r--r--src/textadept.c2
6 files changed, 66 insertions, 6 deletions
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc
index a1384dbf..dd18dce8 100644
--- a/core/.buffer.luadoc
+++ b/core/.buffer.luadoc
@@ -1882,6 +1882,7 @@ function set_lexer(buffer, name) end
-- * hide_selection
-- * index_position_from_line
-- * indicator_value_at
+-- * layout_threads
-- * line_from_index_position
-- * load_lexer_library
-- * mouse_wheel_captures
diff --git a/core/iface.lua b/core/iface.lua
index 52712159..c9e8942f 100644
--- a/core/iface.lua
+++ b/core/iface.lua
@@ -40,7 +40,7 @@ M.functions = {add_ref_document={2376,0,0,1},add_selection={2573,0,3,3},add_styl
-- @see functions
-- @class table
-- @name properties
-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},allocate_lines={0,2089,3,0},anchor={2009,2026,3,0},annotation_lines={2546,0,1,3},annotation_style={2543,2542,3,3},annotation_style_offset={2551,2550,3,0},annotation_styles={2545,2544,8,3},annotation_text={2541,2540,8,3},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_behavior={2635,2634,1,0},auto_c_choose_single={2114,2113,5,0},auto_c_current={2445,0,3,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_options={2639,2638,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,3,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_frame={2704,2705,1,0},caret_line_highlight_sub_line={2773,2774,5,0},caret_line_layer={2764,2765,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_category_optimization={2721,2720,1,0},character_pointer={2520,0,1,0},code_page={2137,2037,1,0},column={2129,0,3,3},command_events={2718,2717,5,0},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},direct_status_function={2772,0,1,0},distance_to_secondary_styles={4025,0,1,0},doc_pointer={2357,2358,1,0},document_options={2379,0,1,0},edge_color={2364,2365,4,0},edge_column={2360,2361,1,0},edge_mode={2362,2363,1,0},element_allows_translucent={2757,0,5,1},element_base_color={2758,0,4,1},element_color={2754,2753,4,1},element_is_set={2756,0,5,1},end_at_last_line={2278,2277,5,0},end_styled={2028,0,3,0},eol_annotation_style={2743,2742,1,3},eol_annotation_style_offset={2748,2747,1,0},eol_annotation_text={2741,2740,8,3},eol_annotation_visible={2746,2745,1,0},eol_mode={2030,2031,1,0},extra_ascent={2526,2525,1,0},extra_descent={2528,2527,1,0},first_visible_line={2152,2613,3,0},focus={2381,2380,5,0},fold_display_text_style={2707,2701,1,0},fold_expanded={2230,2229,5,3},fold_flags={0,2233,1,0},fold_level={2223,2222,1,3},fold_parent={2225,0,3,3},font_locale={2761,2760,8,0},font_quality={2612,2611,1,0},gap_position={2644,0,3,0},h_scroll_bar={2131,2130,5,0},highlight_guide={2135,2134,3,0},hotspot_active_underline={2496,2412,5,0},hotspot_single_line={2497,2421,5,0},i_lexer={0,4033,1,0},identifier={2623,2622,1,0},identifiers={0,4024,7,3},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,3},indic_flags={2685,2684,1,3},indic_fore={2083,2082,4,3},indic_hover_fore={2683,2682,4,3},indic_hover_style={2681,2680,1,3},indic_outline_alpha={2559,2558,1,3},indic_stroke_width={2752,2751,1,3},indic_style={2081,2080,1,3},indic_under={2511,2510,5,3},indicator_current={2501,2500,3,0},indicator_value={2503,2502,1,0},key_words={0,4005,7,1},last_child={2224,0,3,3},layout_cache={2273,2272,1,0},length={2006,0,1,0},lexer={4002,0,1,0},lexer_language={4012,0,8,0},line_character_index={2710,0,1,0},line_count={2154,0,1,0},line_end_position={2136,0,3,3},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,3},line_indentation={2127,2126,1,3},line_state={2093,2092,1,3},line_visible={2228,0,5,3},lines_on_screen={2370,0,1,0},main_selection={2575,2574,3,0},margin_back_n={2251,2250,4,3},margin_cursor_n={2249,2248,1,3},margin_left={2156,2155,1,0},margin_mask_n={2245,2244,1,3},margin_options={2557,2539,1,0},margin_right={2158,2157,1,0},margin_sensitive_n={2247,2246,5,3},margin_style={2533,2532,3,3},margin_style_offset={2538,2537,3,0},margin_styles={2535,2534,8,3},margin_text={2531,2530,8,3},margin_type_n={2241,2240,1,3},margin_width_n={2243,2242,1,3},margins={2253,2252,1,0},marker_alpha={0,2476,1,3},marker_back={0,2042,4,3},marker_back_selected={0,2292,4,3},marker_back_selected_translucent={0,2296,4,3},marker_back_translucent={0,2295,4,3},marker_fore={0,2041,4,3},marker_fore_translucent={0,2294,4,3},marker_layer={2734,2735,1,3},marker_stroke_width={0,2297,1,3},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},move_extends_selection={2706,0,5,0},multi_edge_column={2749,0,1,3},multi_paste={2615,2614,1,0},multiple_selection={2564,2563,5,0},named_styles={4029,0,1,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,3},print_color_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,3,0},rectangular_selection_caret={2589,2588,3,0},rectangular_selection_caret_virtual_space={2593,2592,3,0},rectangular_selection_modifier={2599,2598,1,0},representation={2666,2665,8,7},representation_appearance={2767,2766,1,7},representation_color={2769,2768,4,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_layer={2762,2763,1,0},selection_mode={2423,2422,1,0},selection_n_anchor={2579,2578,3,3},selection_n_anchor_virtual_space={2583,2582,3,3},selection_n_caret={2577,2576,3,3},selection_n_caret_virtual_space={2581,2580,3,3},selection_n_end={2587,2586,3,3},selection_n_end_virtual_space={2727,0,3,3},selection_n_start={2585,2584,3,3},selection_n_start_virtual_space={2726,0,3,3},selection_start={2143,2142,3,0},selections={2570,0,1,0},status={2383,2382,1,0},style_at={2010,0,3,3},style_back={2482,2052,4,3},style_bold={2483,2053,5,3},style_case={2489,2060,1,3},style_changeable={2492,2099,5,3},style_character_set={2490,2066,1,3},style_check_monospaced={2255,2254,5,3},style_eol_filled={2487,2057,5,3},style_font={2486,2056,8,3},style_fore={2481,2051,4,3},style_from_sub_style={4027,0,1,1},style_hot_spot={2493,2409,5,3},style_italic={2484,2054,5,3},style_size={2485,2055,1,3},style_size_fractional={2062,2061,1,3},style_underline={2488,2059,5,3},style_visible={2491,2074,5,3},style_weight={2064,2063,1,3},sub_style_bases={4026,0,8,0},sub_styles_length={4022,0,1,1},sub_styles_start={4021,0,1,1},supports_feature={2750,0,5,1},tab_draw_mode={2698,2699,1,0},tab_indents={2261,2260,5,0},tab_minimum_width={2725,2724,1,0},tab_width={2121,2036,1,0},tag={2616,0,8,1},target_end={2193,2192,3,0},target_end_virtual_space={2731,2730,3,0},target_start={2191,2190,3,0},target_start_virtual_space={2729,2728,3,0},target_text={2687,0,8,0},technology={2631,2630,1,0},text_length={2183,0,1,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},allocate_lines={0,2089,3,0},anchor={2009,2026,3,0},annotation_lines={2546,0,1,3},annotation_style={2543,2542,3,3},annotation_style_offset={2551,2550,3,0},annotation_styles={2545,2544,8,3},annotation_text={2541,2540,8,3},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_behavior={2635,2634,1,0},auto_c_choose_single={2114,2113,5,0},auto_c_current={2445,0,3,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_options={2639,2638,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,3,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_frame={2704,2705,1,0},caret_line_highlight_sub_line={2773,2774,5,0},caret_line_layer={2764,2765,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_category_optimization={2721,2720,1,0},character_pointer={2520,0,1,0},code_page={2137,2037,1,0},column={2129,0,3,3},command_events={2718,2717,5,0},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},direct_status_function={2772,0,1,0},distance_to_secondary_styles={4025,0,1,0},doc_pointer={2357,2358,1,0},document_options={2379,0,1,0},edge_color={2364,2365,4,0},edge_column={2360,2361,1,0},edge_mode={2362,2363,1,0},element_allows_translucent={2757,0,5,1},element_base_color={2758,0,4,1},element_color={2754,2753,4,1},element_is_set={2756,0,5,1},end_at_last_line={2278,2277,5,0},end_styled={2028,0,3,0},eol_annotation_style={2743,2742,1,3},eol_annotation_style_offset={2748,2747,1,0},eol_annotation_text={2741,2740,8,3},eol_annotation_visible={2746,2745,1,0},eol_mode={2030,2031,1,0},extra_ascent={2526,2525,1,0},extra_descent={2528,2527,1,0},first_visible_line={2152,2613,3,0},focus={2381,2380,5,0},fold_display_text_style={2707,2701,1,0},fold_expanded={2230,2229,5,3},fold_flags={0,2233,1,0},fold_level={2223,2222,1,3},fold_parent={2225,0,3,3},font_locale={2761,2760,8,0},font_quality={2612,2611,1,0},gap_position={2644,0,3,0},h_scroll_bar={2131,2130,5,0},highlight_guide={2135,2134,3,0},hotspot_active_underline={2496,2412,5,0},hotspot_single_line={2497,2421,5,0},i_lexer={0,4033,1,0},identifier={2623,2622,1,0},identifiers={0,4024,7,3},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,3},indic_flags={2685,2684,1,3},indic_fore={2083,2082,4,3},indic_hover_fore={2683,2682,4,3},indic_hover_style={2681,2680,1,3},indic_outline_alpha={2559,2558,1,3},indic_stroke_width={2752,2751,1,3},indic_style={2081,2080,1,3},indic_under={2511,2510,5,3},indicator_current={2501,2500,3,0},indicator_value={2503,2502,1,0},key_words={0,4005,7,1},last_child={2224,0,3,3},layout_cache={2273,2272,1,0},layout_threads={2776,2775,1,0},length={2006,0,1,0},lexer={4002,0,1,0},lexer_language={4012,0,8,0},line_character_index={2710,0,1,0},line_count={2154,0,1,0},line_end_position={2136,0,3,3},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,3},line_indentation={2127,2126,1,3},line_state={2093,2092,1,3},line_visible={2228,0,5,3},lines_on_screen={2370,0,1,0},main_selection={2575,2574,3,0},margin_back_n={2251,2250,4,3},margin_cursor_n={2249,2248,1,3},margin_left={2156,2155,1,0},margin_mask_n={2245,2244,1,3},margin_options={2557,2539,1,0},margin_right={2158,2157,1,0},margin_sensitive_n={2247,2246,5,3},margin_style={2533,2532,3,3},margin_style_offset={2538,2537,3,0},margin_styles={2535,2534,8,3},margin_text={2531,2530,8,3},margin_type_n={2241,2240,1,3},margin_width_n={2243,2242,1,3},margins={2253,2252,1,0},marker_alpha={0,2476,1,3},marker_back={0,2042,4,3},marker_back_selected={0,2292,4,3},marker_back_selected_translucent={0,2296,4,3},marker_back_translucent={0,2295,4,3},marker_fore={0,2041,4,3},marker_fore_translucent={0,2294,4,3},marker_layer={2734,2735,1,3},marker_stroke_width={0,2297,1,3},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},move_extends_selection={2706,0,5,0},multi_edge_column={2749,0,1,3},multi_paste={2615,2614,1,0},multiple_selection={2564,2563,5,0},named_styles={4029,0,1,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,3},print_color_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,3,0},rectangular_selection_caret={2589,2588,3,0},rectangular_selection_caret_virtual_space={2593,2592,3,0},rectangular_selection_modifier={2599,2598,1,0},representation={2666,2665,8,7},representation_appearance={2767,2766,1,7},representation_color={2769,2768,4,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_layer={2762,2763,1,0},selection_mode={2423,2422,1,0},selection_n_anchor={2579,2578,3,3},selection_n_anchor_virtual_space={2583,2582,3,3},selection_n_caret={2577,2576,3,3},selection_n_caret_virtual_space={2581,2580,3,3},selection_n_end={2587,2586,3,3},selection_n_end_virtual_space={2727,0,3,3},selection_n_start={2585,2584,3,3},selection_n_start_virtual_space={2726,0,3,3},selection_start={2143,2142,3,0},selections={2570,0,1,0},status={2383,2382,1,0},style_at={2010,0,3,3},style_back={2482,2052,4,3},style_bold={2483,2053,5,3},style_case={2489,2060,1,3},style_changeable={2492,2099,5,3},style_character_set={2490,2066,1,3},style_check_monospaced={2255,2254,5,3},style_eol_filled={2487,2057,5,3},style_font={2486,2056,8,3},style_fore={2481,2051,4,3},style_from_sub_style={4027,0,1,1},style_hot_spot={2493,2409,5,3},style_italic={2484,2054,5,3},style_size={2485,2055,1,3},style_size_fractional={2062,2061,1,3},style_underline={2488,2059,5,3},style_visible={2491,2074,5,3},style_weight={2064,2063,1,3},sub_style_bases={4026,0,8,0},sub_styles_length={4022,0,1,1},sub_styles_start={4021,0,1,1},supports_feature={2750,0,5,1},tab_draw_mode={2698,2699,1,0},tab_indents={2261,2260,5,0},tab_minimum_width={2725,2724,1,0},tab_width={2121,2036,1,0},tag={2616,0,8,1},target_end={2193,2192,3,0},target_end_virtual_space={2731,2730,3,0},target_start={2191,2190,3,0},target_start_virtual_space={2729,2728,3,0},target_text={2687,0,8,0},technology={2631,2630,1,0},text_length={2183,0,1,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},}
---
-- Map of Scintilla event IDs to tables of event names and event parameters.
diff --git a/init.lua b/init.lua
index 41830c2c..92ed6c35 100644
--- a/init.lua
+++ b/init.lua
@@ -282,6 +282,7 @@ view.wrap_mode = view.WRAP_NONE
-- view.wrap_visual_flags_location = view.WRAPVISUALFLAGLOC_END_BY_TEXT
-- view.wrap_indent_mode = view.WRAPINDENT_SAME
-- view.wrap_start_indent =
+view.layout_threads = 1000 -- will be reduced to system specs
-- Long Lines.
-- view.edge_mode = not CURSES and view.EDGE_LINE or view.EDGE_BACKGROUND
diff --git a/src/Makefile b/src/Makefile
index ae0da75f..3291ba1e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -87,7 +87,7 @@ else
pkg-config --silence-errors --cflags ncurses || pkg-config --silence-errors --cflags curses)
CURSES_LIBS = $(shell pkg-config --silence-errors --libs ncursesw || \
pkg-config --silence-errors --libs ncurses || pkg-config --silence-errors --libs curses || \
- echo -lncursesw)
+ echo -lncursesw) -lpthread
install_targets = ../textadept-curses
endif
endif
@@ -345,7 +345,7 @@ else
gtdialog_url = $(root_url)/gtdialog/archive/default.zip
endif
-scintilla_tgz = scintilla514.tgz
+scintilla_tgz = scintilla520.tgz
lexilla_tgz = lexilla510.tgz
scinterm_zip = 475d8d43f3418590c28bd2fb07ee9229d1fa2d07.zip
scintillua_zip = 4cb1464ef738a098f008d6530b776fe780b19c34.zip
diff --git a/src/scintilla.patch b/src/scintilla.patch
index 74fba967..3e1efde2 100644
--- a/src/scintilla.patch
+++ b/src/scintilla.patch
@@ -3,6 +3,8 @@ Scintilla changes:
* Add Message::ChangeInsertion for programmatically setting input method.
This is helpful on newer versions of macOS, where changing the input method is flaky.
* Handle leading whitespace in XPM images in order to prevent crashes.
+* Fix preprocessor condition to enable threading on Linux. This has been committed upstream.
+* Fix crash due to re-entrant painting. This has been committed upstream.
diff -r 52d56f79dc0f gtk/ScintillaGTK.cxx
--- a/gtk/ScintillaGTK.cxx Fri Apr 09 15:11:26 2021 +1000
@@ -13,7 +15,7 @@ diff -r 52d56f79dc0f gtk/ScintillaGTK.cxx
+ case Message::ChangeInsertion:
+ // Hijack this interface to programmatically set input method.
-+ gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(im_context), ConstCharPtrFromSPtr(lParam));
++ gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(im_context.get()), ConstCharPtrFromSPtr(lParam));
+ break;
+
case Message::TargetAsUTF8:
@@ -32,3 +34,61 @@ diff -r 22b6bbb36280 src/XPM.cxx
if ((0 == memcmp(textForm, "/* X", 4)) && (0 == memcmp(textForm, "/* XPM */", 9))) {
// Build the lines form out of the text form
std::vector<const char *> linesForm = LinesFormFromTextForm(textForm);
+diff -r b0e5467561f7 -r c44165c2283e gtk/PlatGTK.cxx
+--- a/gtk/PlatGTK.cxx Thu Feb 10 13:57:56 2022 +1100
++++ b/gtk/PlatGTK.cxx Wed Feb 16 09:13:39 2022 +1100
+@@ -214,7 +214,7 @@
+ Supports::FractionalStrokeWidth,
+ Supports::TranslucentStroke,
+ Supports::PixelModification,
+-#if !defined(PLAT_GTK_WIN32) && !defined(PLAT_GTK_MACOSX)
++#if defined(G_OS_UNIX) && !defined(__APPLE__)
+ // Pango is not thread-safe on Win32 or macOS
+ Supports::ThreadSafeMeasureWidths,
+ #endif
+diff -r c44165c2283e -r 58bb44ceae61 gtk/ScintillaGTK.cxx
+--- a/gtk/ScintillaGTK.cxx Wed Feb 16 09:13:39 2022 +1100
++++ b/gtk/ScintillaGTK.cxx Wed Feb 16 09:32:20 2022 +1100
+@@ -2656,13 +2656,13 @@
+
+ rcPaint = GetClientRectangle();
+
+- PLATFORM_ASSERT(rgnUpdate == nullptr);
++ cairo_rectangle_list_t *oldRgnUpdate = rgnUpdate;
+ rgnUpdate = cairo_copy_clip_rectangle_list(cr);
+ if (rgnUpdate && rgnUpdate->status != CAIRO_STATUS_SUCCESS) {
+ // If not successful then ignore
+ fprintf(stderr, "DrawTextThis failed to copy update region %d [%d]\n", rgnUpdate->status, rgnUpdate->num_rectangles);
+ cairo_rectangle_list_destroy(rgnUpdate);
+- rgnUpdate = 0;
++ rgnUpdate = nullptr;
+ }
+
+ double x1, y1, x2, y2;
+@@ -2687,7 +2687,7 @@
+ if (rgnUpdate) {
+ cairo_rectangle_list_destroy(rgnUpdate);
+ }
+- rgnUpdate = 0;
++ rgnUpdate = oldRgnUpdate;
+ paintState = PaintState::notPainting;
+ } catch (...) {
+ errorStatus = Status::Failure;
+@@ -2759,7 +2759,7 @@
+ ose->area.x + ose->area.width,
+ ose->area.y + ose->area.height);
+
+- PLATFORM_ASSERT(rgnUpdate == nullptr);
++ GdkRegion *oldRgnUpdate = rgnUpdate;
+ rgnUpdate = gdk_region_copy(ose->region);
+ const PRectangle rcClient = GetClientRectangle();
+ paintingAllText = rcPaint.Contains(rcClient);
+@@ -2779,7 +2779,7 @@
+ if (rgnUpdate) {
+ gdk_region_destroy(rgnUpdate);
+ }
+- rgnUpdate = nullptr;
++ rgnUpdate = oldRgnUpdate;
+ } catch (...) {
+ errorStatus = Status::Failure;
+ }
diff --git a/src/textadept.c b/src/textadept.c
index 6c50c04f..794acd3f 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -1154,8 +1154,6 @@ static int call_scintilla(
len = SS(view, msg, wparam, 0);
if (wtype == SLEN) wparam = len;
text = malloc(len + 1), text[len] = '\0';
- if (msg == SCI_GETTEXT || msg == SCI_GETSELTEXT || msg == SCI_GETCURLINE)
- len--; // Scintilla appends '\0' for these messages; compensate
lparam = (sptr_t)text;
}