Mercurial > vim
comparison src/screen.c @ 15991:f362d695bcf9 v8.1.1001
patch 8.1.1001: Visual area not correct when using 'cursorline'
commit https://github.com/vim/vim/commit/8156ed37558231a8167a1a61a147713d84c9af59
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 9 11:46:15 2019 +0100
patch 8.1.1001: Visual area not correct when using 'cursorline'
Problem: Visual area not correct when using 'cursorline'.
Solution: Update w_last_cursorline also in Visual mode. (Hirohito Higashi,
closes #4086)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 09 Mar 2019 12:00:05 +0100 |
parents | 4aaf68cbed32 |
children | 78faa25f9698 |
comparison
equal
deleted
inserted
replaced
15990:5c53c3aced6a | 15991:f362d695bcf9 |
---|---|
3702 cur = cur->next; | 3702 cur = cur->next; |
3703 } | 3703 } |
3704 #endif | 3704 #endif |
3705 | 3705 |
3706 #ifdef FEAT_SYN_HL | 3706 #ifdef FEAT_SYN_HL |
3707 /* Cursor line highlighting for 'cursorline' in the current window. Not | 3707 // Cursor line highlighting for 'cursorline' in the current window. |
3708 * when Visual mode is active, because it's not clear what is selected | 3708 if (wp->w_p_cul && lnum == wp->w_cursor.lnum) |
3709 * then. */ | 3709 { |
3710 if (wp->w_p_cul && lnum == wp->w_cursor.lnum | 3710 // Do not show the cursor line when Visual mode is active, because it's |
3711 && !(wp == curwin && VIsual_active)) | 3711 // not clear what is selected then. Do update w_last_cursorline. |
3712 { | 3712 if (!(wp == curwin && VIsual_active)) |
3713 line_attr = HL_ATTR(HLF_CUL); | 3713 { |
3714 area_highlighting = TRUE; | 3714 line_attr = HL_ATTR(HLF_CUL); |
3715 area_highlighting = TRUE; | |
3716 } | |
3715 wp->w_last_cursorline = wp->w_cursor.lnum; | 3717 wp->w_last_cursorline = wp->w_cursor.lnum; |
3716 } | 3718 } |
3717 #endif | 3719 #endif |
3718 | 3720 |
3719 #ifdef FEAT_TEXT_PROP | 3721 #ifdef FEAT_TEXT_PROP |