Skip to content

Commit

Permalink
fix(bbye): fix switch window failure (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 authored May 15, 2024
1 parent 81fd6ef commit 5880baa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/barbar/bbye.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function bbye.delete(action, force, buffer, mods)
local wins = list_wins()
for i = #wins, 1, -1 do
local window_number = wins[i]
if win_get_buf(window_number) == buffer_number then
if win_is_valid(window_number) and win_get_buf(window_number) == buffer_number then
set_current_win(window_number)

-- Bprevious also wraps around the buffer list, if necessary:
Expand Down

0 comments on commit 5880baa

Please sign in to comment.