diff options
author | 林千里 <lincheney@gmail.com> | 2018-06-06 14:36:19 +1000 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-06-08 02:18:27 +0200 |
commit | 451c48a0926540fe42a307d222c733210551b1d0 (patch) | |
tree | 5dd7f587cb17bcda8647b792aea44c87caedc608 /test/functional/terminal/ex_terminal_spec.lua | |
parent | db68d1d638e4986f7557877ea511e11990b5f4a3 (diff) | |
download | rneovim-451c48a0926540fe42a307d222c733210551b1d0.tar.gz rneovim-451c48a0926540fe42a307d222c733210551b1d0.tar.bz2 rneovim-451c48a0926540fe42a307d222c733210551b1d0.zip |
terminal: flush vterm output buffer on pty output #8486
Fixes #4151
libvterm uses an "output buffer" for terminal reporting
(e.g. \e[6n to report cursor position)
Flush it in on_channel_output() not just terminal_send_key()
See also this line from pangoterm:
https://bazaar.launchpad.net/~leonerd/pangoterm/trunk/view/607/pangoterm.c#L2159
Diffstat (limited to 'test/functional/terminal/ex_terminal_spec.lua')
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index 4f22f7385d..f98add41a0 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -47,6 +47,16 @@ describe(':terminal', function() ]]) end) + it("reads output buffer on terminal reporting #4151", function() + if helpers.pending_win32(pending) then return end + if iswin() then + feed_command([[terminal powershell -NoProfile -NoLogo -Command Write-Host -NoNewline "\"$([char]27)[6n\""; Start-Sleep -Milliseconds 500 ]]) + else + feed_command([[terminal printf '\e[6n'; sleep 0.5 ]]) + end + screen:expect('%^%[%[1;1R', nil, nil, nil, true) + end) + it("in normal-mode :split does not move cursor", function() if iswin() then feed_command([[terminal for /L \\%I in (1,0,2) do ( echo foo & ping -w 100 -n 1 127.0.0.1 > nul )]]) |