Skip to content

Commit

Permalink
fix: redraw after fzf-lua grep
Browse files Browse the repository at this point in the history
Problem:  On `require("fzf-lua").live_grep()`, typing something and
          then closing the plugin window with <Esc>, the statusline
          shows "TER" as the Vim mode. It should be "NOR".
Solution: Add a new base autocmd to the draw method for this case.
  • Loading branch information
hernancerm committed Oct 20, 2024
1 parent 975107b commit 3405726
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/bareline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ components. These components can be Bareline's built-in components
statusline:

|BufEnter|, |BufWinEnter|, |WinEnter|, |VimResume|,
|FocusGained|, |OptionSet|, |DirChanged|.
|FocusGained|, |OptionSet|, |DirChanged|, |TermLeave|.

------------------------------------------------------------------------------
*bareline-bare-component*
Expand Down
4 changes: 2 additions & 2 deletions lua/bareline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ end
--- statusline:
---
--- |BufEnter|, |BufWinEnter|, |WinEnter|, |VimResume|,
--- |FocusGained|, |OptionSet|, |DirChanged|.
--- |FocusGained|, |OptionSet|, |DirChanged|, |TermLeave|.

---@alias UserSuppliedComponent string|function|BareComponent

Expand Down Expand Up @@ -473,7 +473,7 @@ function h.draw_methods.draw_active_inactive_plugin(
vim.api.nvim_create_autocmd(
{
"BufNew", "BufEnter", "BufWinEnter", "WinEnter",
"VimResume", "FocusGained", "DirChanged"
"VimResume", "FocusGained", "DirChanged", "TermLeave"
},
{
group = h.draw_methods_augroup,
Expand Down

0 comments on commit 3405726

Please sign in to comment.