|
1 | 1 | local t = require('test.testutil') |
2 | 2 | local n = require('test.functional.testnvim')() |
| 3 | +local Screen = require('test.functional.ui.screen') |
3 | 4 |
|
4 | 5 | local tt = require('test.functional.testterm') |
5 | 6 | local feed_data = tt.feed_data |
@@ -383,6 +384,37 @@ describe(':terminal window', function() |
383 | 384 | ]]) |
384 | 385 | end) |
385 | 386 |
|
| 387 | + it('in new tabpage has correct terminal size', function() |
| 388 | + screen:set_default_attr_ids({ |
| 389 | + [1] = { reverse = true }, |
| 390 | + [3] = { bold = true }, |
| 391 | + [17] = { background = 2, foreground = Screen.colors.Grey0 }, |
| 392 | + [18] = { background = 2, foreground = 8 }, |
| 393 | + [19] = { underline = true, foreground = Screen.colors.Grey0, background = 7 }, |
| 394 | + [20] = { underline = true, foreground = 5, background = 7 }, |
| 395 | + }) |
| 396 | + |
| 397 | + command('file foo | vsplit') |
| 398 | + screen:expect([[ |
| 399 | + tty ready │tty ready | |
| 400 | + rows: 5, cols: 25 │rows: 5, cols: 25 | |
| 401 | + ^ │ | |
| 402 | + │ |*2 |
| 403 | + {17:foo [-] }{18:foo [-] }| |
| 404 | + {3:-- TERMINAL --} | |
| 405 | + ]]) |
| 406 | + command('tab split') |
| 407 | + screen:expect([[ |
| 408 | + {19: }{20:2}{19: foo }{3: foo }{1: }{19:X}| |
| 409 | + tty ready | |
| 410 | + rows: 5, cols: 25 | |
| 411 | + rows: 5, cols: 50 | |
| 412 | + ^ | |
| 413 | + | |
| 414 | + {3:-- TERMINAL --} | |
| 415 | + ]]) |
| 416 | + end) |
| 417 | + |
386 | 418 | it('not unnecessarily redrawn by events', function() |
387 | 419 | eq('t', eval('mode()')) |
388 | 420 | exec_lua(function() |
|
0 commit comments