Skip to content

Commit

Permalink
feat: add incline.refresh() function (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
b0o committed Mar 8, 2024
1 parent 2f5f609 commit bc6a9c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/incline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Expand Down
7 changes: 7 additions & 0 deletions lua/incline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bc6a9c6

Please sign in to comment.