Commit 18ebcb09 authored by Pablo Rauzy's avatar Pablo Rauzy
Browse files

fix cursor position computation to take into account the bar with the breadcrump etc

parent 36c54b0e
......@@ -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 = activeViewSpace()->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()))) {
......
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