This is the mail archive of the insight-prs@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: insight/202: Error: bad text index "4"


The following reply was made to PR insight/202; it has been noted by GNATS.

From: Ruppert <dieter_ruppert@siemens.com>
To: insight-gnats@sources.redhat.com
Cc:  
Subject: Re: insight/202: Error: bad text index "4"
Date: Thu, 14 Jul 2005 10:06:08 +0200

 This is a simple bug in srctextwin.itb; the linenumber is missing from a 
 tag. Also, to be safe, it is better to create the tag if it is not 
 available.
 
 A patch for srctextwin.itb (relative to 6.1) fixes this:
 
 *** srctextwin.itb.orig Thu Jul 14 09:53:48 2005
 --- srctextwin.itb      Thu Jul 14 10:01:28 2005
 ***************
 *** 1378,1384 ****
        set other_tag [lindex $tag_list \
                       [lsearch -glob $tag_list {*[bt]p_tag}]]
        if {$other_tag == ""} {
 !       set stop 4
        } else {
          set stop [lindex [$win tag nextrange $other_tag \
                            $linenum.0 "$linenum.0 lineend"] 1]
 --- 1378,1384 ----
        set other_tag [lindex $tag_list \
                       [lsearch -glob $tag_list {*[bt]p_tag}]]
        if {$other_tag == ""} {
 !       set stop $linenum.4
        } else {
          set stop [lindex [$win tag nextrange $other_tag \
                            $linenum.0 "$linenum.0 lineend"] 1]
 ***************
 *** 1385,1392 ****
        }
 
        $win tag add $tag $linenum.0 $stop
 -     $win image configure $linenum.0 -image $break_images($img_name)
 
      }
    }
 
 --- 1385,1399 ----
        }
 
        $win tag add $tag $linenum.0 $stop
 
 +     # create tag if missing, otherwise: configure
 +
 +     if {$other_tag == ""} {
 +        $win image create $linenum.0 -image $break_images($img_name)
 +     } else {
 +        $win image configure $linenum.0 -image $break_images($img_name)
 +     }
 +
      }
    }
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]