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
18ebcb09
Commit
18ebcb09
authored
Aug 13, 2022
by
Pablo Rauzy
Browse files
fix cursor position computation to take into account the bar with the breadcrump etc
parent
36c54b0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
apps/lib/kateviewmanager.cpp
View file @
18ebcb09
...
...
@@ -871,7 +871,7 @@ KateViewSpace *KateViewManager::findIntuitiveNeighborView(KateSplitter *splitter
if
(
targetSplitter
->
orientation
()
==
o
)
{
// as long as the orientation is the same we move down in the desired direction
targetChild
=
targetSplitter
->
widget
(
childIndex
);
}
else
{
// otherwise we need to find in which of the two child to go based on the cursor position
QPoint
cursorCoord
=
activeView
Space
()
->
mapToGlobal
(
QPoint
(
0
,
0
))
+
activeView
()
->
cursorPositionCoordinates
();
QPoint
cursorCoord
=
activeView
()
->
mapToGlobal
(
QPoint
(
0
,
0
))
+
activeView
()
->
cursorPositionCoordinates
();
QPoint
targetSplitterCoord
=
targetSplitter
->
widget
(
0
)
->
mapToGlobal
(
QPoint
(
0
,
0
));
if
((
o
==
Qt
::
Horizontal
&&
(
targetSplitterCoord
.
y
()
+
targetSplitter
->
sizes
()[
0
]
>
cursorCoord
.
y
()))
||
(
o
==
Qt
::
Vertical
&&
(
targetSplitterCoord
.
x
()
+
targetSplitter
->
sizes
()[
0
]
>
cursorCoord
.
x
())))
{
...
...
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