(self)
| 391 | self.updateCache() |
| 392 | |
| 393 | def repositionCaret(self): |
| 394 | self.updateCache() |
| 395 | found = False |
| 396 | for i in range(0, len(self.lines)): |
| 397 | if (((self.cursorAddr >= self.lines[i].address) and (self.cursorAddr < (self.lines[i].address + self.lines[i].length))) or |
| 398 | (((i + 1) == len(self.lines)) and (self.cursorAddr == (self.lines[i].address + self.lines[i].length)))): |
| 399 | if i < self.topLine: |
| 400 | self.topLine = i |
| 401 | elif i > (self.topLine + self.visibleRows - 1): |
| 402 | self.topLine = i - (self.visibleRows - 1) |
| 403 | self.updatingScrollBar = True |
| 404 | addr = self.lines[self.topLine].address |
| 405 | self.verticalScrollBar().setValue(self.getContiguousOffsetForAddress(addr) // self.scrollBarMultiplier) |
| 406 | self.updatingScrollBar = False |
| 407 | self.updateCache() |
| 408 | self.viewport().update() |
| 409 | found = True |
| 410 | break |
| 411 | if not found: |
| 412 | self.setTopToAddress(self.cursorAddr) |
| 413 | self.refreshLines() |
| 414 | self.showContextAroundTop() |
| 415 | # Force caret to be visible and repaint |
| 416 | self.caretBlink = True |
| 417 | self.cursorTimer.stop() |
| 418 | self.cursorTimer.start() |
| 419 | self.updateCaret() |
| 420 | UIContext.updateStatus() |
| 421 | |
| 422 | def updateCaret(self): |
| 423 | # Rerender both the old caret position and the new caret position |
no test coverage detected