Mercurial > vim
comparison src/screen.c @ 15436:29f3d59bb6f0 v8.1.0726
patch 8.1.0726: redrawing specifically for conceal feature
commit https://github.com/vim/vim/commit/535d5b653a1eddf49ee11dc9639c5355ef023301
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 11 20:45:36 2019 +0100
patch 8.1.0726: redrawing specifically for conceal feature
Problem: Redrawing specifically for conceal feature.
Solution: Use generic redrawing methods.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 11 Jan 2019 21:00:06 +0100 |
parents | c17b5e30a0af |
children | bc17a9d37810 |
comparison
equal
deleted
inserted
replaced
15435:739e0917d0b6 | 15436:29f3d59bb6f0 |
---|---|
925 /* Need to recompute cursor column, e.g., when starting Visual mode | 925 /* Need to recompute cursor column, e.g., when starting Visual mode |
926 * without concealing. */ | 926 * without concealing. */ |
927 curs_columns(TRUE); | 927 curs_columns(TRUE); |
928 } | 928 } |
929 } | 929 } |
930 | |
931 void | |
932 update_single_line(win_T *wp, linenr_T lnum) | |
933 { | |
934 int row; | |
935 int j; | |
936 #ifdef SYN_TIME_LIMIT | |
937 proftime_T syntax_tm; | |
938 #endif | |
939 | |
940 /* Don't do anything if the screen structures are (not yet) valid. */ | |
941 if (!screen_valid(TRUE) || updating_screen) | |
942 return; | |
943 | |
944 if (lnum >= wp->w_topline && lnum < wp->w_botline | |
945 && foldedCount(wp, lnum, &win_foldinfo) == 0) | |
946 { | |
947 #ifdef SYN_TIME_LIMIT | |
948 /* Set the time limit to 'redrawtime'. */ | |
949 profile_setlimit(p_rdt, &syntax_tm); | |
950 syn_set_timeout(&syntax_tm); | |
951 #endif | |
952 update_prepare(); | |
953 | |
954 row = 0; | |
955 for (j = 0; j < wp->w_lines_valid; ++j) | |
956 { | |
957 if (lnum == wp->w_lines[j].wl_lnum) | |
958 { | |
959 screen_start(); /* not sure of screen cursor */ | |
960 # ifdef FEAT_SEARCH_EXTRA | |
961 init_search_hl(wp); | |
962 prepare_search_hl(wp, lnum); | |
963 # endif | |
964 win_line(wp, lnum, row, row + wp->w_lines[j].wl_size, | |
965 FALSE, FALSE); | |
966 break; | |
967 } | |
968 row += wp->w_lines[j].wl_size; | |
969 } | |
970 | |
971 update_finish(); | |
972 | |
973 #ifdef SYN_TIME_LIMIT | |
974 syn_set_timeout(NULL); | |
975 #endif | |
976 } | |
977 need_cursor_line_redraw = FALSE; | |
978 } | |
979 #endif | 930 #endif |
980 | 931 |
981 #if defined(FEAT_SIGNS) || defined(PROTO) | 932 #if defined(FEAT_SIGNS) || defined(PROTO) |
982 void | 933 void |
983 update_debug_sign(buf_T *buf, linenr_T lnum) | 934 update_debug_sign(buf_T *buf, linenr_T lnum) |