From ac8ed77afb359694a716501d9e87b0c9949b2445 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 14 Nov 2023 08:53:58 -0600 Subject: feat(tui): add 'termsync' option (#25871) The 'termsync' option enables a mode (provided the underlying terminal supports it) where all screen updates during a redraw cycle are buffered and drawn together when the redraw is complete. This eliminates tearing or flickering in cases where Nvim redraws slower than the terminal redraws the screen. --- runtime/lua/vim/_meta/options.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'runtime/lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 0ef0fece90..19ae786177 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -6978,6 +6978,15 @@ vim.o.tpf = vim.o.termpastefilter vim.go.termpastefilter = vim.o.termpastefilter vim.go.tpf = vim.go.termpastefilter +--- If the host terminal supports it, buffer all screen updates +--- made during a redraw cycle so that each screen is displayed in +--- the terminal all at once. This can prevent tearing or flickering +--- when the terminal updates faster than Nvim can redraw. +--- +--- @type boolean +vim.o.termsync = true +vim.go.termsync = vim.o.termsync + --- Maximum width of text that is being inserted. A longer line will be --- broken after white space to get this width. A zero value disables --- this. -- cgit