Tk Library Source Code

View Ticket
Login
Ticket UUID: 521590
Title: tabify2/untabify2 fails on empty string
Type: Bug Version: None
Submitter: jenglish Created on: 2002-02-22 20:28:08
Subsystem: textutil Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2002-02-27 06:36:20
Resolution: Fixed Closed By: jenglish
    Closed on: 2002-02-26 23:36:20
Description:
textutil::untabify2 and textutil::tabify2 both fail on
the empty string, due to an uninitialized variable.  

Attached patch fixes the bug and adds this test to the
test suite.

On an unrelated note: are 'tabify' and 'untabify'
really needed?  They don't do anything useful (or that
couldn't be accompished with [string map] or [regsub]
in the unlikely event that someone does want this
behaviour); they should probably be replaced with the
tabify2/untabify2 implementations.
User Comments: jenglish added on 2002-02-27 06:36:20:
Logged In: YES 
user_id=68433

OK, patch committed.

andreas_kupries added on 2002-02-27 02:46:12:
Logged In: YES 
user_id=75003

Sure, if you want to please do. Less load for me :)

jenglish added on 2002-02-23 03:35:34:
Logged In: YES 
user_id=68433

Quick followup: the [tabifyLine] and [untabifyLine]
procedures also look useful; could these be added to the
public API?

Also: I have write permission on the repository so I can
commit the patch from here if you like.

jenglish added on 2002-02-23 03:28:16:

File Added - 18262: tabify.patch

Attachments: