Patch 8.1.1179
Problem:    No test for mouse clicks in the fold column.
Solution:   Add a test. (Dominique Pelle, closes #4261)
Files:      src/testdir/test_termcodes.vim


*** ../vim-8.1.1178/src/testdir/test_termcodes.vim      2019-04-17 
16:26:57.677439389 +0200
--- src/testdir/test_termcodes.vim      2019-04-17 16:30:54.844217343 +0200
***************
*** 395,397 ****
--- 395,448 ----
    let &ttymouse = save_ttymouse
    set mousetime&
  endfunc
+ 
+ func Test_xterm_mouse_click_in_fold_columns()
+   new
+   let save_mouse = &mouse
+   let save_term = &term
+   let save_ttymouse = &ttymouse
+   let save_foldcolumn = &foldcolumn
+   set mouse=a term=xterm foldcolumn=3
+ 
+   " Create 2 nested folds.
+   call setline(1, range(1, 7))
+   2,6fold
+   norm! zR
+   4,5fold
+   call assert_equal([-1, -1, -1, 4, 4, -1, -1],
+         \           map(range(1, 7), 'foldclosed(v:val)'))
+ 
+   " Click in "+" of inner fold in foldcolumn should open it.
+   redraw
+   let row = 4
+   let col = 2
+   call MouseLeftClick(row, col)
+   call MouseLeftRelease(row, col)
+   call assert_equal([-1, -1, -1, -1, -1, -1, -1],
+         \           map(range(1, 7), 'foldclosed(v:val)'))
+ 
+   " Click in "-" of outer fold in foldcolumn should close it.
+   redraw
+   let row = 2
+   let col = 1
+   call MouseLeftClick(row, col)
+   call MouseLeftRelease(row, col)
+   call assert_equal([-1, 2, 2, 2, 2, 2, -1],
+         \           map(range(1, 7), 'foldclosed(v:val)'))
+   norm! zR
+ 
+   " Click in "|" of inner fold in foldcolumn should close it.
+   redraw
+   let row = 5
+   let col = 2
+   call MouseLeftClick(row, col)
+   call MouseLeftRelease(row, col)
+   call assert_equal([-1, -1, -1, 4, 4, -1, -1],
+         \           map(range(1, 7), 'foldclosed(v:val)'))
+ 
+   let &foldcolumn = save_foldcolumn
+   let &ttymouse = save_ttymouse
+   let &term = save_term
+   let &mouse = save_mouse
+   bwipe!
+ endfunc
*** ../vim-8.1.1178/src/version.c       2019-04-17 16:26:57.677439389 +0200
--- src/version.c       2019-04-17 16:30:43.908273796 +0200
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1179,
  /**/

-- 
The greatest lies of all time:
  (1) The check is in the mail.
  (2) We have a really challenging assignment for you.
  (3) I love you.
  (4) All bugs have been fixed.
  (5) This won't hurt a bit.
  (6) Honey, I just need to debug this program and be home in 5 minutes.
  (7) I have just sent you an e-mail about that.
  (8) Of course I'll respect you in the morning.
  (9) I'm from the government, and I'm here to help you.

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui