diff --git a/doc/incline.txt b/doc/incline.txt index 999a0b5..707b71c 100644 --- a/doc/incline.txt +++ b/doc/incline.txt @@ -52,6 +52,9 @@ Incline is disabled by default. To enable it, you must call either `incline.is_enabled()` *incline.is_enabled()* Returns `true` if Incline is enabled, else `false`. + `incline.refresh()` *incline.refresh()* + Forces a re-render of all Incline statuslines on the current tabpage. + ------------------------------------------------------------------------------ 2.2 Configuration *incline-config* diff --git a/lua/incline/init.lua b/lua/incline/init.lua index 4c28170..9983dbd 100644 --- a/lua/incline/init.lua +++ b/lua/incline/init.lua @@ -31,4 +31,11 @@ M.setup = function(_config) M.enable() end +M.refresh = function() + if not M.is_enabled() then + return + end + manager.update { refresh = true } +end + return M