TODO: this is a hack, but Kate does not provide interface for this
| 18 | |
| 19 | // TODO: this is a hack, but Kate does not provide interface for this |
| 20 | int lineHeight(const KTextEditor::View* view, int curLine) |
| 21 | { |
| 22 | KTextEditor::Cursor c(curLine, 0); |
| 23 | int currentHeight = view->cursorToCoordinate(c).y(); |
| 24 | c.setLine(curLine + 1); |
| 25 | if (view->cursorToCoordinate(c).y() < 0) { |
| 26 | c.setLine(curLine - 1); |
| 27 | } |
| 28 | return std::abs(view->cursorToCoordinate(c).y() - currentHeight); |
| 29 | } |
| 30 | |
| 31 | } |
| 32 |
no test coverage detected