bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix: GSTextStorage, setAttributes:range:


From: Georg Fleischmann
Subject: Fix: GSTextStorage, setAttributes:range:
Date: Sat, 16 Dec 2000 23:56:02 +0100

Hi,

here is a fix for GSTextStorage. It ensures that the first attribute starts at  
location = 0. Otherwise _attributesAtIndexEffectiveRange() would raise.

Georg


2000-12-16 Georg Fleischmann

        * gui/Source/GSTextStorage.m ([GSTextStorage -setAttributes:range:]):
        first attribute always starts at loc = 0


*** gui/Source/GSTextStorage.m.old      Sat Dec 16 19:25:08 2000
--- gui/Source/GSTextStorage.m  Sat Dec 16 19:25:31 2000
***************
*** 621,627 ****
    info = OBJECTAT(arrayIndex);
    if (info->loc >= beginRangeLoc || info->attrs == attributes)
      {
!       info->loc = beginRangeLoc;
        unCacheAttributes(info->attrs);
        RELEASE(info->attrs);
        info->attrs = attributes;
--- 621,630 ----
    info = OBJECTAT(arrayIndex);
    if (info->loc >= beginRangeLoc || info->attrs == attributes)
      {
!       if (arrayIndex == 0)
!         info->loc = 0;
!       else
!         info->loc = beginRangeLoc;
        unCacheAttributes(info->attrs);
        RELEASE(info->attrs);
        info->attrs = attributes;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]