Patch 8.1.1142
Problem:    No test for dragging the window separators with the mouse.
Solution:   Add a test. (Dominique Pelle, closes #4226)
Files:      src/testdir/test_termcodes.vim


*** ../vim-8.1.1141/src/testdir/test_termcodes.vim      2019-04-07 
21:55:03.732116294 +0200
--- src/testdir/test_termcodes.vim      2019-04-09 21:49:50.990047878 +0200
***************
*** 111,113 ****
--- 111,171 ----
    let &ttymouse = save_ttymouse
    bwipe!
  endfunc
+ 
+ func Test_xterm_mouse_drag_window_separator()
+   let save_mouse = &mouse
+   let save_term = &term
+   let save_ttymouse = &ttymouse
+   set mouse=a
+   set term=xterm
+   set ttymouse=sgr
+ 
+   " Split horizontally and test dragging the horizontal window separator.
+   split
+   let rowseparator = winheight(0) + 1
+ 
+   let button = 0  " left down.
+   let row = rowseparator
+   let col = 1
+   call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+ 
+   let drag = 32
+   let row -= 1
+   call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
+   call assert_equal(rowseparator - 1, winheight(0) + 1)
+   let row += 1
+   call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
+   call assert_equal(rowseparator, winheight(0) + 1)
+ 
+   let release = 3
+   call feedkeys(printf("\<Esc>[<%d;%d;%dm", release, col, row), 'Lx!')
+   call assert_equal(rowseparator, winheight(0) + 1)
+ 
+   bwipe!
+ 
+   " Split vertically and test dragging the vertical window separator.
+   vsplit
+   let colseparator = winwidth(0) + 1
+ 
+   let button = 0
+   let row = 1
+   let col = colseparator
+   call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+ 
+   let drag = 32
+   let col -= 1
+   call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
+   call assert_equal(colseparator - 1, winwidth(0) + 1)
+   let col += 1
+   call feedkeys(printf("\<Esc>[<%d;%d;%dM", drag, col, row), 'Lx!')
+   call assert_equal(colseparator, winwidth(0) + 1)
+ 
+   let release = 3
+   call feedkeys(printf("\<Esc>[<%d;%d;%dm", release, col, row), 'Lx!')
+   call assert_equal(colseparator, winwidth(0) + 1)
+ 
+   bwipe!
+   let &mouse = save_mouse
+   let &term = save_term
+   let &ttymouse = save_ttymouse
+ endfunc
*** ../vim-8.1.1141/src/version.c       2019-04-09 21:17:28.837660254 +0200
--- src/version.c       2019-04-09 21:51:24.301503517 +0200
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1142,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
238. You think faxes are old-fashioned.

 /// 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