File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
lua/neogit/buffers/status Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -293,18 +293,18 @@ function M:redraw(cursor, view)
293
293
logger .debug (" [STATUS] Rendering UI" )
294
294
self .buffer .ui :render (unpack (ui .Status (git .repo .state , self .config )))
295
295
296
- if self .fold_state then
296
+ if self .fold_state and self . buffer then
297
297
logger .debug (" [STATUS] Restoring fold state" )
298
298
self .buffer .ui :set_fold_state (self .fold_state )
299
299
self .fold_state = nil
300
300
end
301
301
302
- if self .cursor_state and self .view_state then
302
+ if self .cursor_state and self .view_state and self . buffer then
303
303
logger .debug (" [STATUS] Restoring cursor and view state" )
304
304
self .buffer :restore_view (self .view_state , self .cursor_state )
305
305
self .view_state = nil
306
306
self .cursor_state = nil
307
- elseif cursor and view then
307
+ elseif cursor and view and self . buffer then
308
308
self .buffer :restore_view (view , self .buffer .ui :resolve_cursor_location (cursor ))
309
309
end
310
310
end
You can’t perform that action at this time.
0 commit comments