diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-05-18 21:53:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-18 21:53:20 +0200 |
| commit | 974b43fd7940cd807e5a6b67c77cb2e0462b11a4 (patch) | |
| tree | a8c3d747d3bca47d5b52758b02de199b83146186 /src/nvim/testdir/test_edit.vim | |
| parent | 1cbe0145695bea4168b4e23f61e29e51684088e1 (diff) | |
| parent | d07a6e2b45175439891beafc5e75f68f92eabd65 (diff) | |
| download | rneovim-974b43fd7940cd807e5a6b67c77cb2e0462b11a4.tar.gz rneovim-974b43fd7940cd807e5a6b67c77cb2e0462b11a4.tar.bz2 rneovim-974b43fd7940cd807e5a6b67c77cb2e0462b11a4.zip | |
Merge #10028 from janlazo/vim-8.1.1345
vim-patch:8.1.{1325,1345,1348,1349}
Diffstat (limited to 'src/nvim/testdir/test_edit.vim')
| -rw-r--r-- | src/nvim/testdir/test_edit.vim | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index de0f3ddb06..7f3994300f 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -1385,9 +1385,26 @@ func Test_edit_complete_very_long_name() return endtry - " Try to get the Vim window position before setting 'columns'. + " 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 |