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
0919ddef
Commit
0919ddef
authored
Jul 16, 2021
by
Waqar Ahmed
Committed by
Christoph Cullmann
Jul 17, 2021
Browse files
LocHistory: When limiting size, also rewind currentLocation
(cherry picked from commit
e31d729c
)
parent
e7241670
Changes
1
Hide whitespace changes
Inline
Side-by-side
kate/kateviewspace.cpp
View file @
0919ddef
...
...
@@ -539,8 +539,10 @@ void KateViewSpace::addPositionToHistory(const QUrl &url, KTextEditor::Cursor c,
}
// limit size to 50, remove first 10
if
(
m_locations
.
size
()
>=
50
)
{
m_locations
.
erase
(
m_locations
.
begin
(),
m_locations
.
begin
()
+
10
);
int
toErase
=
(
int
)
m_locations
.
size
()
-
50
;
if
(
toErase
>
0
)
{
m_locations
.
erase
(
m_locations
.
begin
(),
m_locations
.
begin
()
+
toErase
);
currentLocation
-=
toErase
;
}
}
int
KateViewSpace
::
hiddenDocuments
()
const
...
...
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