comparison src/screen.c @ 12433:735b49ff8fbb v8.0.1096

patch 8.0.1096: terminal window in Normal mode has wrong background commit https://github.com/vim/vim/commit/238d43b32859d1b4e6b7072d552289a748cbfee1 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 11 22:00:51 2017 +0200 patch 8.0.1096: terminal window in Normal mode has wrong background Problem: Terminal window in Normal mode has wrong background. Solution: Store the default background and use it for clearning until the end of the line. Not for below the last line, since there is no text there.
author Christian Brabandt <cb@256bit.org>
date Mon, 11 Sep 2017 22:15:04 +0200
parents 4dba3e4f3b01
children 40961647f547
comparison
equal deleted inserted replaced
12432:e635ff0a804f 12433:735b49ff8fbb
3137 #if defined(LINE_ATTR) 3137 #if defined(LINE_ATTR)
3138 int did_line_attr = 0; 3138 int did_line_attr = 0;
3139 #endif 3139 #endif
3140 #ifdef FEAT_TERMINAL 3140 #ifdef FEAT_TERMINAL
3141 int get_term_attr = FALSE; 3141 int get_term_attr = FALSE;
3142 int term_attr = 0; /* background for terminal window */
3142 #endif 3143 #endif
3143 3144
3144 /* draw_state: items that are drawn in sequence: */ 3145 /* draw_state: items that are drawn in sequence: */
3145 #define WL_START 0 /* nothing done yet */ 3146 #define WL_START 0 /* nothing done yet */
3146 #ifdef FEAT_CMDWIN 3147 #ifdef FEAT_CMDWIN
3254 #ifdef FEAT_TERMINAL 3255 #ifdef FEAT_TERMINAL
3255 if (term_show_buffer(wp->w_buffer)) 3256 if (term_show_buffer(wp->w_buffer))
3256 { 3257 {
3257 extra_check = TRUE; 3258 extra_check = TRUE;
3258 get_term_attr = TRUE; 3259 get_term_attr = TRUE;
3260 term_attr = term_get_attr(wp->w_buffer, 0, 0);
3259 } 3261 }
3260 #endif 3262 #endif
3261 3263
3262 #ifdef FEAT_SPELL 3264 #ifdef FEAT_SPELL
3263 if (wp->w_p_spell 3265 if (wp->w_p_spell
5055 #if defined(LINE_ATTR) 5057 #if defined(LINE_ATTR)
5056 else if (( 5058 else if ((
5057 # ifdef FEAT_DIFF 5059 # ifdef FEAT_DIFF
5058 diff_hlf != (hlf_T)0 || 5060 diff_hlf != (hlf_T)0 ||
5059 # endif 5061 # endif
5062 # ifdef FEAT_TERMINAL
5063 term_attr != 0 ||
5064 # endif
5060 line_attr != 0 5065 line_attr != 0
5061 ) && ( 5066 ) && (
5062 # ifdef FEAT_RIGHTLEFT 5067 # ifdef FEAT_RIGHTLEFT
5063 wp->w_p_rl ? (col >= 0) : 5068 wp->w_p_rl ? (col >= 0) :
5064 # endif 5069 # endif
5087 char_attr = HL_ATTR(diff_hlf); 5092 char_attr = HL_ATTR(diff_hlf);
5088 if (wp->w_p_cul && lnum == wp->w_cursor.lnum) 5093 if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
5089 char_attr = hl_combine_attr(char_attr, 5094 char_attr = hl_combine_attr(char_attr,
5090 HL_ATTR(HLF_CUL)); 5095 HL_ATTR(HLF_CUL));
5091 } 5096 }
5097 }
5098 # endif
5099 # ifdef FEAT_TERMINAL
5100 if (term_attr != 0)
5101 {
5102 char_attr = term_attr;
5103 if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
5104 char_attr = hl_combine_attr(char_attr,
5105 HL_ATTR(HLF_CUL));
5092 } 5106 }
5093 # endif 5107 # endif
5094 } 5108 }
5095 #endif 5109 #endif
5096 } 5110 }