diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-08-21 23:53:48 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-08-22 01:01:14 -0300 |
commit | 105a72eabc6f74195b6319471344148726683b9d (patch) | |
tree | 55be5a39a0a889393e5540ab6877df7ace796e33 /test/functional/terminal/scrollback_spec.lua | |
parent | f9778052af733af643444946d33e6e5f9b3fba1b (diff) | |
download | rneovim-105a72eabc6f74195b6319471344148726683b9d.tar.gz rneovim-105a72eabc6f74195b6319471344148726683b9d.tar.bz2 rneovim-105a72eabc6f74195b6319471344148726683b9d.zip |
terminal: Fix use after free
Since close_cb may free the terminal structure, save the "wipe" flag before
calling it.
Diffstat (limited to 'test/functional/terminal/scrollback_spec.lua')
-rw-r--r-- | test/functional/terminal/scrollback_spec.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index f2381631a9..87cc9a8266 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -343,6 +343,17 @@ describe('terminal prints more lines than the screen height and exits', function [Program exited, press any key to close] | -- TERMINAL -- | ]]) + feed('<cr>') + -- closes the buffer correctly after pressing a key + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + ~ | + ~ | + | + ]]) end) end) |