mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:00:48 +00:00
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:
parent
b432343546
commit
e1aa98ed75
1 changed files with 10 additions and 1 deletions
|
@ -1061,10 +1061,18 @@ TODO: not really clear what these should do
|
|||
_selected_range.location += lengthChange;
|
||||
}
|
||||
else if (_selected_range.location + _selected_range.length >= range.location)
|
||||
{
|
||||
if (-lengthChange > _selected_range.length)
|
||||
{
|
||||
_selected_range.length = 0;
|
||||
_selected_range.location = range.location;
|
||||
}
|
||||
else
|
||||
{
|
||||
_selected_range.length += lengthChange;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Invalidate display from the first glyph not laid out (which will
|
||||
generally be the first glyph to have been invalidated). */
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue