[plt-scheme] Another text% question

From: Erich Rast (Erich.Rast at t-online.de)
Date: Fri Mar 14 12:19:51 EST 2003

As it seems, text% does not remember style changes like one might 
expect when the selection is empty. For example, when I type something 
without special style attribute, then issue a command that boils down to

(send this change-style (make-object style-delta% 'change-toggle-style 
'italic) 'start 'end)

whereas the selection length actually is zero, and then issue the same 
command again, the style is not plain, but remains italic as if the 
style had been toggled only once. The same for weights.

But if the empty selection is at the start of the text, it works like 
it should and toggles back to plain style.

Question: Can anyone confirm this? Is it a bug or is it supposed to be 
a feature?

Anyway, I'd need to know if this is going to be changed (like I hope) 
or not, as my subclass has to mimmick the exact behavior of the 
internal buffer in order to maintain a custom style range array that 
otherwise already works well with sticky styles.

(tested with Plt/MrEd version 203 and 202 on OS X, release versions)



Posted on the users mailing list.