aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/stdlib.c
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-12-15 15:18:06 +0000
committerGitHub <noreply@github.com>2021-12-15 08:18:06 -0700
commit0a1391fdd742608de4efb6e6f2ca0f57590a0869 (patch)
tree39d1c8530f2a210893845fe3150f57ee1f27f41f /src/nvim/lua/stdlib.c
parentcf65071e2ef6defcb7125daddf09fc4a52cc85cd (diff)
downloadrneovim-0a1391fdd742608de4efb6e6f2ca0f57590a0869.tar.gz
rneovim-0a1391fdd742608de4efb6e6f2ca0f57590a0869.tar.bz2
rneovim-0a1391fdd742608de4efb6e6f2ca0f57590a0869.zip
fix(terminal): fix resize crash with pending scrollback (#14891)
refresh_scrollback assumes pending scrollback rows exist only if the terminal window height decreased (or the screen was full). However, after accumulating scrollback, it's possible in some cases for the terminal height to increase before refresh_scrollback is called via invalidation (especially when the terminal buffer isn't initially displayed in a window before nvim_open_term), which may crash. As we'll have enough room for some scrollback rows, just append them to the top of the buffer until it fills the window, then continue with the previous logic for any remaining scrollback rows if necessary.
Diffstat (limited to 'src/nvim/lua/stdlib.c')
0 files changed, 0 insertions, 0 deletions