diff src/testdir/test_edit.vim @ 11315:0c091a7c588c v8.0.0543

patch 8.0.0543: test_edit causes older xfce4-terminal to close commit https://github.com/vim/vim/commit/ba6ec182973af726ce9b7b7eb3753fc3a7ae7d1b Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 4 22:41:10 2017 +0200 patch 8.0.0543: test_edit causes older xfce4-terminal to close Problem: Test_edit causes older xfce4-terminal to close. (Dominique Pelle) Solution: Reduce number of columns to 2000. Try to restore the window position.
author Christian Brabandt <cb@256bit.org>
date Tue, 04 Apr 2017 22:45:05 +0200
parents cb2040d45876
children 2dc624388934
line wrap: on
line diff
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -1328,10 +1328,14 @@ func Test_edit_complete_very_long_name()
     " Long directory names only work on Unix.
     return
   endif
+  " Try to get the Vim window position before setting 'columns'.
+  let winposx = getwinposx()
+  let winposy = getwinposy()
   let save_columns = &columns
-  set columns=5000
-  call assert_equal(5000, &columns)
+  set columns=2000
+  call assert_equal(2000, &columns)
   set noswapfile
+
   let dirname = getcwd() . "/Xdir"
   let longdirname = dirname . repeat('/' . repeat('d', 255), 4)
   let longfilename = longdirname . '/' . repeat('a', 255)
@@ -1345,5 +1349,8 @@ func Test_edit_complete_very_long_name()
   exe 'bwipe! ' . longfilename
   call delete(dirname, 'rf')
   let &columns = save_columns
+  if winposx >= 0 && winposy >= 0
+    exe 'winpos ' . winposx . ' ' . winposy
+  endif
   set swapfile&
 endfunc