diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2023-12-08 18:44:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-09 10:44:16 +0800 |
commit | c651fb30427a3c645b4b1bd8a9b7e767af51e014 (patch) | |
tree | acb7e1d90206e71239cadce2a84f5ca1402845e2 /test | |
parent | f45bf44176461992e7ed7c381aa9750e8955517f (diff) | |
download | rneovim-c651fb30427a3c645b4b1bd8a9b7e767af51e014.tar.gz rneovim-c651fb30427a3c645b4b1bd8a9b7e767af51e014.tar.bz2 rneovim-c651fb30427a3c645b4b1bd8a9b7e767af51e014.zip |
refactor(tui): use synchronized updates around actual buf flush (#26478)
Rather than writing the synchronized update begin and end sequences into
the TUI's internal buffer (where it is later flushed to the TTY), write
these sequences directly to the TTY before and after the TUI's internal
buffer is itself flushed to the TTY.
This guarantees that a synchronized update is always used when we are
actually sending data to the TTY. This means we do not need to keep
track of the TUI's "dirty" state (any sequences which affect the TUI
state will be written in the TUI's internal buffer, which is now
guaranteed to only ever be written when a synchronized update is
active).
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 4d2f20d6d5..9978bcca9d 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -1671,10 +1671,9 @@ describe('TUI', function() -- Use full screen message so that redrawing afterwards is more deterministic. child_session:notify('nvim_command', 'intro') screen:expect({any = 'Nvim'}) - -- Hiding the cursor needs 6 bytes. -- Going to top-left corner needs 3 bytes. -- Setting underline attribute needs 9 bytes. - -- The whole line needs 6 + 3 + 9 + 65513 + 3 = 65534 bytes. + -- The whole line needs 3 + 9 + 65513 + 3 = 65528 bytes. -- The cursor_address that comes after will overflow the 65535-byte buffer. local line = ('a'):rep(65513) .. '℃' child_session:notify('nvim_exec_lua', [[ |