diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-07 19:43:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-07 19:43:29 +0800 |
commit | 629169462a82f0fbb7a8911a4554894537d6776c (patch) | |
tree | 5283dfed1895ddc3a421963a00f2ded42db81056 /test/functional/terminal/window_split_tab_spec.lua | |
parent | fa8b2b4c50c089804a57f77aed6650b7e4c3f0cc (diff) | |
download | rneovim-629169462a82f0fbb7a8911a4554894537d6776c.tar.gz rneovim-629169462a82f0fbb7a8911a4554894537d6776c.tar.bz2 rneovim-629169462a82f0fbb7a8911a4554894537d6776c.zip |
fix(terminal): skip aucmd_win when checking terminal size (#19668)
Diffstat (limited to 'test/functional/terminal/window_split_tab_spec.lua')
-rw-r--r-- | test/functional/terminal/window_split_tab_spec.lua | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/test/functional/terminal/window_split_tab_spec.lua b/test/functional/terminal/window_split_tab_spec.lua index c92107082e..b62d173cea 100644 --- a/test/functional/terminal/window_split_tab_spec.lua +++ b/test/functional/terminal/window_split_tab_spec.lua @@ -2,12 +2,14 @@ local helpers = require('test.functional.helpers')(after_each) local thelpers = require('test.functional.terminal.helpers') local assert_alive = helpers.assert_alive local clear = helpers.clear -local feed, nvim = helpers.feed, helpers.nvim +local feed = helpers.feed local feed_command = helpers.feed_command local command = helpers.command local eq = helpers.eq local eval = helpers.eval +local meths = helpers.meths local iswin = helpers.iswin +local sleep = helpers.sleep local retry = helpers.retry describe(':terminal', function() @@ -17,10 +19,10 @@ describe(':terminal', function() clear() -- set the statusline to a constant value because of variables like pid -- and current directory and to improve visibility of splits - nvim('set_option', 'statusline', '==========') - nvim('command', 'highlight StatusLine cterm=NONE') - nvim('command', 'highlight StatusLineNC cterm=NONE') - nvim('command', 'highlight VertSplit cterm=NONE') + meths.set_option('statusline', '==========') + command('highlight StatusLine cterm=NONE') + command('highlight StatusLineNC cterm=NONE') + command('highlight VertSplit cterm=NONE') screen = thelpers.screen_setup(3) end) @@ -68,6 +70,27 @@ describe(':terminal', function() ]]) end) + it('does not change size if updated when not visible in any window #19665', function() + local channel = meths.buf_get_option(0, 'channel') + command('enew') + sleep(100) + meths.chan_send(channel, 'foo') + sleep(100) + command('bprevious') + screen:expect([[ + tty ready | + ^foo{2: } | + | + | + | + | + | + | + | + | + ]]) + end) + it('forwards resize request to the program', function() feed([[<C-\><C-N>G]]) local w1, h1 = screen._width - 3, screen._height - 2 |