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/terminal/scrollback_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/terminal/scrollback_spec.lua')
-rw-r--r-- | test/functional/terminal/scrollback_spec.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index 75bb89a1ab..544325e746 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -142,15 +142,15 @@ describe(':terminal scrollback', function() describe('and height decreased by 1', function() if helpers.pending_win32(pending) then return end local function will_hide_top_line() - feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom. + feed([[<C-\><C-N>]]) screen:try_resize(screen._width - 2, screen._height - 1) screen:expect([[ line2 | line3 | line4 | rows: 5, cols: 28 | - {2: } | - :^ | + {2:^ } | + | ]]) end @@ -166,11 +166,11 @@ describe(':terminal scrollback', function() screen:expect([[ rows: 5, cols: 28 | rows: 3, cols: 26 | - {2: } | - :^ | + {2:^ } | + | ]]) eq(8, curbuf('line_count')) - feed([[<C-\><C-N>3k]]) + feed([[3k]]) screen:expect([[ ^line4 | rows: 5, cols: 28 | |