diff options
author | Javier Lopez <graulopezjavier@gmail.com> | 2022-07-04 15:09:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-04 13:09:47 -0700 |
commit | 1803b0ffd7f08b50a3f59272ebe7290ffd21e90f (patch) | |
tree | d8507551eb4c33afaa133d7d2da00975005dde7c /test/functional/ui/screen.lua | |
parent | ab5929e1b0f13b8750c8a97d41396ac9a0769e18 (diff) | |
download | rneovim-1803b0ffd7f08b50a3f59272ebe7290ffd21e90f.tar.gz rneovim-1803b0ffd7f08b50a3f59272ebe7290ffd21e90f.tar.bz2 rneovim-1803b0ffd7f08b50a3f59272ebe7290ffd21e90f.zip |
fix(tui): resize at startup #17795
* fix(test): screen.lua nil index
When actual_rows and expected_rows are different avoid a nil index.
* fix(tui): resize at startup
The deleted code is not needed after 402b4e8.
It caused the condition to false positive when the function was called
more than once before startup (first normal mode). Being itself what
set the dimension and not the user, locking the size of the screen to
an incorrect size.
Make got_winch an int to mitigate: tui_grid_resize changing the size
of the host terminal between the signal handler and the call to
sigwinch_cb. Since the actual signal handler uv__signal_handle doesn't
directly call the callback, the event loop does.
Fixes #17285
Fixes #15044
Fixes #11330
Diffstat (limited to 'test/functional/ui/screen.lua')
-rw-r--r-- | test/functional/ui/screen.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index e628fcea01..ea98705394 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -383,7 +383,7 @@ function Screen:expect(expected, attr_ids, ...) for i, row in ipairs(expected_rows) do msg_expected_rows[i] = row local m = (row ~= actual_rows[i] and row:match('{MATCH:(.*)}') or nil) - if row ~= actual_rows[i] and (not m or not actual_rows[i]:match(m)) then + if row ~= actual_rows[i] and (not m or not (actual_rows[i] and actual_rows[i]:match(m))) then msg_expected_rows[i] = '*' .. msg_expected_rows[i] if i <= #actual_rows then actual_rows[i] = '*' .. actual_rows[i] |