Skip to content

Commit

Permalink
fix: directly return false for 'IsNeedKeep' when 'keep_last_tab=0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bush2021 committed Apr 11, 2024
1 parent 0e00f4a commit d96ffd0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tabbookmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ bool IsPressed(int key) {
}

bool IsNeedKeep(HWND hwnd, int32_t* ptr = nullptr) {
if (!IsKeepLastTab()) {
return false;
}

bool keep_tab = false;

NodePtr top_container_view = GetTopContainerView(hwnd);
Expand All @@ -27,7 +31,6 @@ bool IsNeedKeep(HWND hwnd, int32_t* ptr = nullptr) {
if (tab_count == 0) { // 处理全屏等状态
is_only_one_tab = false;
}

keep_tab = is_only_one_tab;

if (ptr) {
Expand Down

0 comments on commit d96ffd0

Please sign in to comment.