Commit 52f25484 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Fix closing a widget when its the only tab

parent b2b33af7
Pipeline #237449 passed with stage
in 11 minutes and 17 seconds
......@@ -360,19 +360,18 @@ void KateViewManager::slotDocumentClose(KTextEditor::Document *document)
void KateViewManager::slotDocumentClose()
{
// no active view, do nothing
auto view = activeView();
if (!view) {
return;
}
auto vs = activeViewSpace();
if (vs) {
if (auto vs = activeViewSpace()) {
if (auto w = vs->currentWidget()) {
vs->closeTabWithWidget(w);
return;
}
// no active view, do nothing
auto view = activeView();
if (!view) {
return;
}
vs->closeDocument(view->document());
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment