comparison src/terminal.c @ 11844:42585fee5e66 v8.0.0802

patch 8.0.0802: last line of terminal window has no color commit https://github.com/vim/vim/commit/70229f951f00cdcff790f2e70b0b0a601202e9e7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 29 16:01:53 2017 +0200 patch 8.0.0802: last line of terminal window has no color Problem: After a job exits the last line in the terminal window does not get color attributes. Solution: Fix off-by-one error.
author Christian Brabandt <cb@256bit.org>
date Sat, 29 Jul 2017 16:15:03 +0200
parents 6bfcedcc0262
children 1c65cad8b967
comparison
equal deleted inserted replaced
11843:94f7feb4ddcb 11844:42585fee5e66
1268 term_get_attr(buf_T *buf, linenr_T lnum, int col) 1268 term_get_attr(buf_T *buf, linenr_T lnum, int col)
1269 { 1269 {
1270 term_T *term = buf->b_term; 1270 term_T *term = buf->b_term;
1271 sb_line_T *line; 1271 sb_line_T *line;
1272 1272
1273 if (lnum >= term->tl_scrollback.ga_len) 1273 if (lnum > term->tl_scrollback.ga_len)
1274 return 0; 1274 return 0;
1275 line = (sb_line_T *)term->tl_scrollback.ga_data + lnum - 1; 1275 line = (sb_line_T *)term->tl_scrollback.ga_data + lnum - 1;
1276 if (col >= line->sb_cols) 1276 if (col >= line->sb_cols)
1277 return 0; 1277 return 0;
1278 return cell2attr(line->sb_cells + col); 1278 return cell2attr(line->sb_cells + col);