File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 44 "time"
55
66 "github.com/jesseduffield/gocui"
7+ "github.com/jesseduffield/lazygit/pkg/gui/context"
78 "github.com/jesseduffield/lazygit/pkg/gui/types"
89 "github.com/jesseduffield/lazygit/pkg/tasks"
910 "github.com/jesseduffield/lazygit/pkg/utils"
@@ -136,5 +137,17 @@ func (gui *Gui) postRefreshUpdate(c types.Context) {
136137
137138 if gui .currentViewName () == c .GetViewName () {
138139 c .HandleFocus (types.OnFocusOpts {})
140+ } else {
141+ currentCtx := gui .State .ContextMgr .Current ()
142+ if currentCtx .GetKey () == context .NORMAL_MAIN_CONTEXT_KEY || currentCtx .GetKey () == context .NORMAL_SECONDARY_CONTEXT_KEY {
143+ // Searching can't cope well with the view being updated while it is being searched.
144+ // We might be able to fix the problems with this, but it doesn't seem easy, so for now
145+ // just don't rerender the view while searching, on the assumption that users will probably
146+ // either search or change their data, but not both at the same time.
147+ if ! currentCtx .GetView ().IsSearching () {
148+ parentCtx := currentCtx .GetParentContext ()
149+ parentCtx .HandleRenderToMain ()
150+ }
151+ }
139152 }
140153}
You can’t perform that action at this time.
0 commit comments