Mercurial > vim
comparison src/highlight.c @ 29812:68ef14b21d01 v9.0.0245
patch 9.0.0245: mechanism to prevent recursive screen updating is incomplete
Commit: https://github.com/vim/vim/commit/471c0fa3eed4f6207d1cb7636970547bfd2eee26
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 22 15:19:16 2022 +0100
patch 9.0.0245: mechanism to prevent recursive screen updating is incomplete
Problem: Mechanism to prevent recursive screen updating is incomplete.
Solution: Add "redraw_not_allowed" and set it in build_stl_str_hl().
(issue #10952)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 22 Aug 2022 16:30:03 +0200 |
parents | 89e1d67814a9 |
children | 0cc9a3001717 |
comparison
equal
deleted
inserted
replaced
29811:4a20a89bf324 | 29812:68ef14b21d01 |
---|---|
937 #ifdef FEAT_GUI | 937 #ifdef FEAT_GUI |
938 // Don't do this if the GUI is used. | 938 // Don't do this if the GUI is used. |
939 if (!gui.in_use && !gui.starting) | 939 if (!gui.in_use && !gui.starting) |
940 #endif | 940 #endif |
941 { | 941 { |
942 must_redraw = UPD_CLEAR; | 942 set_must_redraw(UPD_CLEAR); |
943 if (termcap_active && color >= 0) | 943 if (termcap_active && color >= 0) |
944 term_fg_color(color); | 944 term_fg_color(color); |
945 } | 945 } |
946 } | 946 } |
947 } | 947 } |
960 #ifdef FEAT_GUI | 960 #ifdef FEAT_GUI |
961 // Don't mess with 'background' if the GUI is used. | 961 // Don't mess with 'background' if the GUI is used. |
962 if (!gui.in_use && !gui.starting) | 962 if (!gui.in_use && !gui.starting) |
963 #endif | 963 #endif |
964 { | 964 { |
965 must_redraw = UPD_CLEAR; | 965 set_must_redraw(UPD_CLEAR); |
966 if (color >= 0) | 966 if (color >= 0) |
967 { | 967 { |
968 int dark = -1; | 968 int dark = -1; |
969 | 969 |
970 if (termcap_active) | 970 if (termcap_active) |
1003 #ifdef FEAT_GUI | 1003 #ifdef FEAT_GUI |
1004 // Don't do this if the GUI is used. | 1004 // Don't do this if the GUI is used. |
1005 if (!gui.in_use && !gui.starting) | 1005 if (!gui.in_use && !gui.starting) |
1006 #endif | 1006 #endif |
1007 { | 1007 { |
1008 must_redraw = UPD_CLEAR; | 1008 set_must_redraw(UPD_CLEAR); |
1009 if (termcap_active && color >= 0) | 1009 if (termcap_active && color >= 0) |
1010 term_ul_color(color); | 1010 term_ul_color(color); |
1011 } | 1011 } |
1012 } | 1012 } |
1013 } | 1013 } |
1917 if (set_group_colors((char_u *)"Normal", | 1917 if (set_group_colors((char_u *)"Normal", |
1918 &gui.norm_pixel, &gui.back_pixel, | 1918 &gui.norm_pixel, &gui.back_pixel, |
1919 FALSE, TRUE, FALSE)) | 1919 FALSE, TRUE, FALSE)) |
1920 { | 1920 { |
1921 gui_mch_new_colors(); | 1921 gui_mch_new_colors(); |
1922 must_redraw = UPD_CLEAR; | 1922 set_must_redraw(UPD_CLEAR); |
1923 } | 1923 } |
1924 # ifdef FEAT_GUI_X11 | 1924 # ifdef FEAT_GUI_X11 |
1925 if (set_group_colors((char_u *)"Menu", | 1925 if (set_group_colors((char_u *)"Menu", |
1926 &gui.menu_fg_pixel, &gui.menu_bg_pixel, | 1926 &gui.menu_fg_pixel, &gui.menu_bg_pixel, |
1927 TRUE, FALSE, FALSE)) | 1927 TRUE, FALSE, FALSE)) |
1928 { | 1928 { |
1929 # ifdef FEAT_MENU | 1929 # ifdef FEAT_MENU |
1930 gui_mch_new_menu_colors(); | 1930 gui_mch_new_menu_colors(); |
1931 # endif | 1931 # endif |
1932 must_redraw = UPD_CLEAR; | 1932 set_must_redraw(UPD_CLEAR); |
1933 } | 1933 } |
1934 # ifdef FEAT_BEVAL_GUI | 1934 # ifdef FEAT_BEVAL_GUI |
1935 if (set_group_colors((char_u *)"Tooltip", | 1935 if (set_group_colors((char_u *)"Tooltip", |
1936 &gui.tooltip_fg_pixel, &gui.tooltip_bg_pixel, | 1936 &gui.tooltip_fg_pixel, &gui.tooltip_bg_pixel, |
1937 FALSE, FALSE, TRUE)) | 1937 FALSE, FALSE, TRUE)) |
1938 { | 1938 { |
1939 # ifdef FEAT_TOOLBAR | 1939 # ifdef FEAT_TOOLBAR |
1940 gui_mch_new_tooltip_colors(); | 1940 gui_mch_new_tooltip_colors(); |
1941 # endif | 1941 # endif |
1942 must_redraw = UPD_CLEAR; | 1942 set_must_redraw(UPD_CLEAR); |
1943 } | 1943 } |
1944 # endif | 1944 # endif |
1945 if (set_group_colors((char_u *)"Scrollbar", | 1945 if (set_group_colors((char_u *)"Scrollbar", |
1946 &gui.scroll_fg_pixel, &gui.scroll_bg_pixel, | 1946 &gui.scroll_fg_pixel, &gui.scroll_bg_pixel, |
1947 FALSE, FALSE, FALSE)) | 1947 FALSE, FALSE, FALSE)) |
1948 { | 1948 { |
1949 gui_new_scrollbar_colors(); | 1949 gui_new_scrollbar_colors(); |
1950 must_redraw = UPD_CLEAR; | 1950 set_must_redraw(UPD_CLEAR); |
1951 } | 1951 } |
1952 # endif | 1952 # endif |
1953 } | 1953 } |
1954 # endif | 1954 # endif |
1955 # ifdef FEAT_TERMGUICOLORS | 1955 # ifdef FEAT_TERMGUICOLORS |
1971 { | 1971 { |
1972 // if the GUI color is INVALCOLOR then we use the default cterm | 1972 // if the GUI color is INVALCOLOR then we use the default cterm |
1973 // color | 1973 // color |
1974 cterm_normal_fg_gui_color = HL_TABLE()[idx].sg_gui_fg; | 1974 cterm_normal_fg_gui_color = HL_TABLE()[idx].sg_gui_fg; |
1975 cterm_normal_bg_gui_color = HL_TABLE()[idx].sg_gui_bg; | 1975 cterm_normal_bg_gui_color = HL_TABLE()[idx].sg_gui_bg; |
1976 must_redraw = UPD_CLEAR; | 1976 set_must_redraw(UPD_CLEAR); |
1977 } | 1977 } |
1978 } | 1978 } |
1979 } | 1979 } |
1980 # endif | 1980 # endif |
1981 } | 1981 } |
2543 } | 2543 } |
2544 recursive = TRUE; | 2544 recursive = TRUE; |
2545 | 2545 |
2546 clear_hl_tables(); | 2546 clear_hl_tables(); |
2547 | 2547 |
2548 must_redraw = UPD_CLEAR; | 2548 set_must_redraw(UPD_CLEAR); |
2549 | 2549 |
2550 for (i = 0; i < highlight_ga.ga_len; ++i) | 2550 for (i = 0; i < highlight_ga.ga_len; ++i) |
2551 set_hl_attr(i); | 2551 set_hl_attr(i); |
2552 | 2552 |
2553 recursive = FALSE; | 2553 recursive = FALSE; |