Patch 8.2.1957
Problem:    Diff and cursorcolumn highlighting don't mix.
Solution:   Fix condition for what attribute to use. (Christian Brabandt,
            closes #7258, closes #7260)
Files:      src/drawline.c, src/testdir/dumps/Test_diff_cuc_01.dump,
            src/testdir/dumps/Test_diff_cuc_02.dump,
            src/testdir/dumps/Test_diff_cuc_03.dump,
            src/testdir/dumps/Test_diff_cuc_04.dump,
            src/testdir/test_diffmode.vim


*** ../vim-8.2.1956/src/drawline.c      2020-09-15 20:52:03.164972054 +0200
--- src/drawline.c      2020-11-05 19:04:47.103916859 +0100
***************
*** 1873,1878 ****
--- 1873,1879 ----
                        char_u  *prev_ptr, *p;
                        int     len;
                        hlf_T   spell_hlf = HLF_COUNT;
+ 
                        if (has_mbyte)
                        {
                            prev_ptr = ptr - mb_l;
***************
*** 2778,2787 ****
        // Also highlight the 'colorcolumn' if 'breakindent' and/or 'showbreak'
        // options are set
        vcol_save_attr = -1;
!       if ((draw_state == WL_LINE ||
             draw_state == WL_BRI ||
             draw_state == WL_SBR) && !lnum_in_visual_area
                && search_attr == 0 && area_attr == 0)
        {
            if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol
                                                 && lnum != wp->w_cursor.lnum)
--- 2779,2792 ----
        // Also highlight the 'colorcolumn' if 'breakindent' and/or 'showbreak'
        // options are set
        vcol_save_attr = -1;
!       if (((draw_state == WL_LINE ||
             draw_state == WL_BRI ||
             draw_state == WL_SBR) && !lnum_in_visual_area
                && search_attr == 0 && area_attr == 0)
+ # ifdef FEAT_DIFF
+                       && filler_todo <= 0
+ # endif
+               )
        {
            if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol
                                                 && lnum != wp->w_cursor.lnum)
*** ../vim-8.2.1956/src/testdir/dumps/Test_diff_cuc_01.dump     2020-11-05 
19:06:41.659619180 +0100
--- src/testdir/dumps/Test_diff_cuc_01.dump     2020-11-05 19:04:47.103916859 
+0100
***************
*** 0 ****
--- 1,20 ----
+ >a+0&#ffffff0@1| @34||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32
+ |-+0#4040ff13#afffff255@36||+1#0000000#ffffff0| 
+0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255@1| @32
+ |c+0&#e0e0e08|c+0&#ffffff0| @34||+1&&| 
+0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32
+ |~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1| |[+1&&|N|o| 
|N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1
+ | +0&&@74
*** ../vim-8.2.1956/src/testdir/dumps/Test_diff_cuc_02.dump     2020-11-05 
19:06:41.663619169 +0100
--- src/testdir/dumps/Test_diff_cuc_02.dump     2020-11-05 19:04:47.103916859 
+0100
***************
*** 0 ****
--- 1,20 ----
+ |a+0&#ffffff0>a| @34||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32
+ |-+0#4040ff13#afffff255@36||+1#0000000#ffffff0| 
+0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255@1| @32
+ |c+0&#ffffff0|c+0&#e0e0e08| +0&#ffffff0@34||+1&&| 
+0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32
+ |~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|2| @11|A|l@1| |[+1&&|N|o| 
|N|a|m|e|]| |[|+|]| @5|1|,|2| @11|A|l@1
+ | +0&&@74
*** ../vim-8.2.1956/src/testdir/dumps/Test_diff_cuc_03.dump     2020-11-05 
19:06:41.667619159 +0100
--- src/testdir/dumps/Test_diff_cuc_03.dump     2020-11-05 19:04:47.103916859 
+0100
***************
*** 0 ****
--- 1,20 ----
+ |a+0&#e0e0e08|a+0&#ffffff0| @34||+1&&| 
+0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32
+ |-+0#4040ff13#afffff255@36||+1#0000000#ffffff0| 
+0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255@1| @32
+ >c+0&#ffffff0@1| @34||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32
+ |~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|2|,|1| @11|A|l@1| |[+1&&|N|o| 
|N|a|m|e|]| |[|+|]| @5|3|,|1| @11|A|l@1
+ | +0&&@74
*** ../vim-8.2.1956/src/testdir/dumps/Test_diff_cuc_04.dump     2020-11-05 
19:06:41.671619148 +0100
--- src/testdir/dumps/Test_diff_cuc_04.dump     2020-11-05 19:04:47.103916859 
+0100
***************
*** 0 ****
--- 1,20 ----
+ |a+0&#ffffff0|a+0&#e0e0e08| +0&#ffffff0@34||+1&&| 
+0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32
+ |-+0#4040ff13#afffff255@36||+1#0000000#ffffff0| 
+0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255@1| @32
+ |c+0&#ffffff0>c| @34||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32
+ |~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|2|,|2| @11|A|l@1| |[+1&&|N|o| 
|N|a|m|e|]| |[|+|]| @5|3|,|2| @11|A|l@1
+ | +0&&@74
*** ../vim-8.2.1956/src/testdir/test_diffmode.vim       2020-08-12 
18:50:31.875655822 +0200
--- src/testdir/test_diffmode.vim       2020-11-05 19:04:47.103916859 +0100
***************
*** 1150,1153 ****
--- 1150,1186 ----
    set ls&
  endfunc
  
+ func Test_diff_filler_cursorcolumn()
+   CheckScreendump
+ 
+   let content =<< trim END
+     call setline(1, ['aa', 'bb', 'cc'])
+     vnew
+     call setline(1, ['aa', 'cc'])
+     windo diffthis
+     wincmd p
+     setlocal cursorcolumn foldcolumn=0
+     norm! gg0
+     redraw!
+   END
+   call writefile(content, 'Xtest_diff_cuc')
+   let buf = RunVimInTerminal('-S Xtest_diff_cuc', {})
+ 
+   call VerifyScreenDump(buf, 'Test_diff_cuc_01', {})
+ 
+   call term_sendkeys(buf, "l")
+   call term_sendkeys(buf, "\<C-l>")
+   call VerifyScreenDump(buf, 'Test_diff_cuc_02', {})
+   call term_sendkeys(buf, "0j")
+   call term_sendkeys(buf, "\<C-l>")
+   call VerifyScreenDump(buf, 'Test_diff_cuc_03', {})
+   call term_sendkeys(buf, "l")
+   call term_sendkeys(buf, "\<C-l>")
+   call VerifyScreenDump(buf, 'Test_diff_cuc_04', {})
+ 
+   " clean up
+   call StopVimInTerminal(buf)
+   call delete('Xtest_diff_cuc')
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.1956/src/version.c       2020-11-05 18:45:42.970909982 +0100
--- src/version.c       2020-11-05 19:05:23.943821126 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     1957,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
197. Your desk collapses under the weight of your computer peripherals.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202011051807.0A5I7vlY197648%40masaka.moolenaar.net.

Raspunde prin e-mail lui