diff src/testdir/test_termcodes.vim @ 19752:0927df746554 v8.2.0432

patch 8.2.0432: a few tests fail in a huge terminal Commit: https://github.com/vim/vim/commit/ab505b1a4868b3e21356f95a275537551700c955 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 23 19:28:44 2020 +0100 patch 8.2.0432: a few tests fail in a huge terminal Problem: A few tests fail in a huge terminal. Solution: Make the tests pass. (Dominique Pelle, closes https://github.com/vim/vim/issues/5829)
author Bram Moolenaar <Bram@vim.org>
date Mon, 23 Mar 2020 19:30:06 +0100
parents 0208534b8a84
children 244eb8d8d100
line wrap: on
line diff
--- a/src/testdir/test_termcodes.vim
+++ b/src/testdir/test_termcodes.vim
@@ -758,16 +758,20 @@ func Test_term_mouse_click_in_cmdline_to
   let row = &lines
 
   for ttymouse_val in g:Ttymouse_values + g:Ttymouse_dec
-    let msg = 'ttymouse=' .. ttymouse_val
-    exe 'set ttymouse=' .. ttymouse_val
+    " When 'ttymouse' is 'xterm2', row/col bigger than 223 are not supported.
+    if ttymouse_val !=# 'xterm2' || row <= 223
+      let msg = 'ttymouse=' .. ttymouse_val
+      exe 'set ttymouse=' .. ttymouse_val
+
 
-    call feedkeys(':"3456789'
-          \       .. MouseLeftClickCode(row, 7)
-          \       .. MouseLeftReleaseCode(row, 7) .. 'L'
-          \       .. MouseRightClickCode(row, 4)
-          \       .. MouseRightReleaseCode(row, 4) .. 'R'
-          \       .. "\<CR>", 'Lx!')
-    call assert_equal('"3R456L789', @:, msg)
+      call feedkeys(':"3456789'
+            \       .. MouseLeftClickCode(row, 7)
+            \       .. MouseLeftReleaseCode(row, 7) .. 'L'
+            \       .. MouseRightClickCode(row, 4)
+            \       .. MouseRightReleaseCode(row, 4) .. 'R'
+            \       .. "\<CR>", 'Lx!')
+      call assert_equal('"3R456L789', @:, msg)
+    endif
   endfor
 
   let &mouse = save_mouse