Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
38527c72
Commit
38527c72
authored
Jan 21, 2022
by
Waqar Ahmed
Browse files
Fix the check to also handle 0 doc views
BUG: 448847
parent
b1802f4a
Pipeline
#126423
passed with stage
in 3 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kate/kateviewspace.cpp
View file @
38527c72
...
...
@@ -399,15 +399,15 @@ void KateViewSpace::registerDocument(KTextEditor::Document *doc)
void
KateViewSpace
::
closeDocument
(
KTextEditor
::
Document
*
doc
)
{
auto
it
=
m_docToView
.
find
(
doc
);
Q_ASSERT
(
it
!=
m_docToView
.
end
());
// If this is the only view of the document,
// OR the doc has no views yet
// just close the document and it will take
// care of removing the view + cleaning up the doc
if
(
doc
->
views
().
size
()
=
=
1
)
{
if
(
doc
->
views
().
size
()
<
=
1
)
{
m_viewManager
->
slotDocumentClose
(
doc
);
}
else
{
auto
it
=
m_docToView
.
find
(
doc
);
Q_ASSERT
(
it
!=
m_docToView
.
end
());
// We have other views of this doc in other viewspaces
// Just remove the view
m_viewManager
->
deleteView
(
it
->
second
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment