| 1299 | } |
| 1300 | |
| 1301 | void DiffWidget::jumpToPrevFile() |
| 1302 | { |
| 1303 | const int block = m_left->firstVisibleBlockNumber(); |
| 1304 | int prevFileLineNo = 0; |
| 1305 | for (auto i = m_linesWithFileName.crbegin(); i != m_linesWithFileName.crend(); ++i) { |
| 1306 | if (*i < block) { |
| 1307 | prevFileLineNo = *i; |
| 1308 | break; |
| 1309 | } |
| 1310 | } |
| 1311 | |
| 1312 | QScopedValueRollback r(m_stopScrollSync, true); |
| 1313 | m_left->scrollToBlock(prevFileLineNo, true); |
| 1314 | if (m_style == SideBySide) { |
| 1315 | m_right->scrollToBlock(prevFileLineNo, true); |
| 1316 | } |
| 1317 | } |
| 1318 | |
| 1319 | void DiffWidget::jumpToNextHunk() |
| 1320 | { |
nothing calls this directly
no test coverage detected