Skip to content
GitLab
Menu
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
8573b124
Commit
8573b124
authored
Feb 20, 2022
by
Waqar Ahmed
Committed by
Christoph Cullmann
Feb 20, 2022
Browse files
Fix LRU tab behaviour
BUG: 434062
parent
2fcb0fba
Pipeline
#140198
passed with stage
in 2 minutes and 25 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
kate/kateviewspace.cpp
View file @
8573b124
...
...
@@ -325,6 +325,16 @@ void KateViewSpace::removeView(KTextEditor::View *v)
// ...and now: remove from view space
stack
->
removeWidget
(
v
);
// Remove the doc now!
// Why do this now? Because otherwise it messes up the LRU
// because we get two "currentChanged" signals
// - First signal when we "showView" below
// - Second comes soon after when v->document() is destroyed
// Handling (blocking) both signals here is necessary
m_tabBar
->
blockSignals
(
true
);
documentDestroyed
(
v
->
document
());
m_tabBar
->
blockSignals
(
false
);
// switch to most recently used rather than letting stack choose one
// (last element could well be v->document() being removed here)
for
(
auto
rit
=
m_registeredDocuments
.
rbegin
();
rit
!=
m_registeredDocuments
.
rend
();
++
rit
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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