diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-04-11 13:51:07 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-05-14 12:54:39 +0200 |
commit | 5020daa6e5ced9235f5d11317c74f655a129803e (patch) | |
tree | 3de6f25bd1bf1579e84c88a3fa9829b395131bd6 /test/functional/ui/searchhl_spec.lua | |
parent | aa82f8b88fe82077740894dd387801384e0558b6 (diff) | |
download | rneovim-5020daa6e5ced9235f5d11317c74f655a129803e.tar.gz rneovim-5020daa6e5ced9235f5d11317c74f655a129803e.tar.bz2 rneovim-5020daa6e5ced9235f5d11317c74f655a129803e.zip |
ui/terminal: make terminal state redraw like any other state
Previously, ordinary redraws were missing from terminal mode. Instead,
there was an async callback that invoked update_screen() on terminal
data regardless of mode (as if :redraw! was invoked by a timer).
This created some issues:
- async changes to an unrelated ordinary buffer were not always redrawn in
terminal mode
- screen cursor position was not properly updated in terminal mode (partial
fix, will be properly fixed in a follow up PR)
- ad-hoc logic was needed for interaction with special states such as
inccommand or horizontal wildmenu.
Instead redraw terminal mode just like any other state. This disables forced
redraws in cmdline mode, which were inconisent which async changes to
normal buffers (which are not redrawn in cmdline mode).
Diffstat (limited to 'test/functional/ui/searchhl_spec.lua')
-rw-r--r-- | test/functional/ui/searchhl_spec.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua index a46670d8a2..65ae124353 100644 --- a/test/functional/ui/searchhl_spec.lua +++ b/test/functional/ui/searchhl_spec.lua @@ -163,12 +163,14 @@ describe('search highlighting', function() ]]) feed('/foo') sleep(50) -- Allow some terminal activity. - screen:expect([[ - {3:foo} bar baz {3:│}xxx | - bar baz {2:foo} {3:│}xxx | - bar {2:foo} baz {3:│}xxx | - {3:│}xxx | - {1:~ }{3:│}xxx | + -- NB: in earlier versions terminal output was redrawn during cmdline mode. + -- For now just assert that the screens remain unchanged. + screen:expect([[ + {3:foo} bar baz {3:│} | + bar baz {2:foo} {3:│} | + bar {2:foo} baz {3:│} | + {3:│} | + {1:~ }{3:│} | {5:[No Name] [+] }{3:term }| /foo^ | ]], { [1] = {bold = true, foreground = Screen.colors.Blue1}, |