Skip to content
Snippets Groups Projects
Commit 04f44b99 authored by George Nachman's avatar George Nachman
Browse files

Fix crash when a trigger highlights the last char on the screen

parent 8829e53d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -756,7 +756,8 @@ static char* FormatCont(int c)
screen_char_t *theLine = nil;
int lineY = -1;
[self setDirtyFromX:startPoint.x Y:startPoint.y toX:endPoint.x Y:endPoint.y];
while (x != endPoint.x || y != endPoint.y) {
int n = endPoint.x + endPoint.y * WIDTH;
while (x + y * WIDTH < n) {
if (lineY != y) {
theLine = [self getLineAtScreenIndex:y];
lineY = y;
Loading
Loading
@@ -844,6 +845,10 @@ static char* FormatCont(int c)
int endY = y + end / WIDTH;
int endX = end % WIDTH;
 
if (endY >= HEIGHT) {
endY = HEIGHT - 1;
endX = WIDTH;
}
[self highlightWithChar:prototypechar fromPoint:NSMakePoint(startX, startY) toPoint:NSMakePoint(endX, endY)];
 
searchRange.location = range.location + range.length;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment