Patch 8.1.1348
Problem:    Running tests may cause the window to move.
Solution:   Correct the reported window position for the offset with the
            position after ":winpos".  Works around an xterm bug.
Files:      src/testdir/test_edit.vim


*** ../vim-8.1.1347/src/testdir/test_edit.vim   2019-04-27 18:00:29.851064563 
+0200
--- src/testdir/test_edit.vim   2019-05-18 16:51:30.495698892 +0200
***************
*** 1359,1367 ****
      return
    endtry
  
!   " Try to get the Vim window position before setting 'columns'.
    let winposx = getwinposx()
    let winposy = getwinposy()
    let save_columns = &columns
    " Need at least about 1100 columns to reproduce the problem.
    set columns=2000
--- 1359,1384 ----
      return
    endtry
  
!   " Try to get the Vim window position before setting 'columns', so that we 
can
!   " move the window back to where it was.
    let winposx = getwinposx()
    let winposy = getwinposy()
+ 
+   if winposx >= 0 && winposy >= 0 && !has('gui_running')
+     " We did get the window position, but xterm may report the wrong numbers.
+     " Move the window to the reported position and compute any offset.
+     exe 'winpos ' . winposx . ' ' . winposy
+     sleep 100m
+     let x = getwinposx()
+     if x >= 0
+       let winposx += winposx - x
+     endif
+     let y = getwinposy()
+     if y >= 0
+       let winposy += winposy - y
+     endif
+   endif
+ 
    let save_columns = &columns
    " Need at least about 1100 columns to reproduce the problem.
    set columns=2000
*** ../vim-8.1.1347/src/version.c       2019-05-18 15:36:06.493897710 +0200
--- src/version.c       2019-05-18 16:53:03.739139925 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1348,
  /**/

-- 
The budget process was invented by an alien race of sadistic beings who
resemble large cats.
                                (Scott Adams - The Dilbert principle)

 /// 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/201905181523.x4IFNBDV017138%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui