Mercurial > vim
comparison src/testdir/test_termcodes.vim @ 16310:5b8b849dc3aa v8.1.1160
patch 8.1.1160: termcodes test would fail in a very big terminal
commit https://github.com/vim/vim/commit/c8b3ddab51cd2901d5946949d02c96e1035b25c0
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 12 21:42:52 2019 +0200
patch 8.1.1160: termcodes test would fail in a very big terminal
Problem: Termcodes test would fail in a very big terminal.
Solution: Bail out when the row is larger than what will work. (Dominique
Pelle, closes #4246)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Apr 2019 21:45:06 +0200 |
parents | f3d579f009d1 |
children | 57e0f6b4a87d |
comparison
equal
deleted
inserted
replaced
16309:f21de4c36152 | 16310:5b8b849dc3aa |
---|---|
116 " Split horizontally and test dragging the horizontal window separator. | 116 " Split horizontally and test dragging the horizontal window separator. |
117 split | 117 split |
118 let rowseparator = winheight(0) + 1 | 118 let rowseparator = winheight(0) + 1 |
119 let row = rowseparator | 119 let row = rowseparator |
120 let col = 1 | 120 let col = 1 |
121 | |
122 if ttymouse_val ==# 'xterm' && row > 223 | |
123 " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported. | |
124 continue | |
125 endif | |
126 | |
121 call MouseLeftClick(row, col) | 127 call MouseLeftClick(row, col) |
122 | 128 |
123 let row -= 1 | 129 let row -= 1 |
124 call MouseLeftDrag(row, col) | 130 call MouseLeftDrag(row, col) |
125 call assert_equal(rowseparator - 1, winheight(0) + 1) | 131 call assert_equal(rowseparator - 1, winheight(0) + 1) |
166 | 172 |
167 call assert_equal(1, &cmdheight) | 173 call assert_equal(1, &cmdheight) |
168 let rowstatusline = winheight(0) + 1 | 174 let rowstatusline = winheight(0) + 1 |
169 let row = rowstatusline | 175 let row = rowstatusline |
170 let col = 1 | 176 let col = 1 |
177 | |
178 if ttymouse_val ==# 'xterm' && row > 223 | |
179 " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported. | |
180 continue | |
181 endif | |
182 | |
171 call MouseLeftClick(row, col) | 183 call MouseLeftClick(row, col) |
172 let row -= 1 | 184 let row -= 1 |
173 call MouseLeftDrag(row, col) | 185 call MouseLeftDrag(row, col) |
174 call assert_equal(2, &cmdheight) | 186 call assert_equal(2, &cmdheight) |
175 call assert_equal(rowstatusline - 1, winheight(0) + 1) | 187 call assert_equal(rowstatusline - 1, winheight(0) + 1) |