Fix adjustment of selection range when entire selection is removed.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15759 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-01-29 15:05:12 +00:00
parent 1c5f6f4772
commit 5580ccd32c

View file

@ -1062,7 +1062,15 @@ TODO: not really clear what these should do
}
else if (_selected_range.location + _selected_range.length >= range.location)
{
_selected_range.length += lengthChange;
if (-lengthChange > _selected_range.length)
{
_selected_range.length = 0;
_selected_range.location = range.location;
}
else
{
_selected_range.length += lengthChange;
}
}
}
@ -1079,6 +1087,7 @@ TODO: not really clear what these should do
[[textcontainers[i].textContainer textView] sizeToFit]; /* TODO? */
[[textcontainers[i].textContainer textView] setNeedsDisplay: YES];
}
}
@end