File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 4
4
"time"
5
5
6
6
"github.com/jesseduffield/gocui"
7
+ "github.com/jesseduffield/lazygit/pkg/gui/context"
7
8
"github.com/jesseduffield/lazygit/pkg/gui/types"
8
9
"github.com/jesseduffield/lazygit/pkg/tasks"
9
10
"github.com/jesseduffield/lazygit/pkg/utils"
@@ -143,5 +144,17 @@ func (gui *Gui) postRefreshUpdate(c types.Context) {
143
144
// correctly, and that integration tests see the up to date selection
144
145
// state.
145
146
c .FocusLine ()
147
+
148
+ currentCtx := gui .State .ContextMgr .Current ()
149
+ if currentCtx .GetKey () == context .NORMAL_MAIN_CONTEXT_KEY || currentCtx .GetKey () == context .NORMAL_SECONDARY_CONTEXT_KEY {
150
+ // Searching can't cope well with the view being updated while it is being searched.
151
+ // We might be able to fix the problems with this, but it doesn't seem easy, so for now
152
+ // just don't rerender the view while searching, on the assumption that users will probably
153
+ // either search or change their data, but not both at the same time.
154
+ if ! currentCtx .GetView ().IsSearching () {
155
+ parentCtx := currentCtx .GetParentContext ()
156
+ parentCtx .HandleRenderToMain ()
157
+ }
158
+ }
146
159
}
147
160
}
You can’t perform that action at this time.
0 commit comments