Re: [code] [textadept][bug] Tab width in OSX is wrong

From: Mitchell <m.att.foicica.com>
Date: Thu, 4 Sep 2014 11:06:51 -0400 (Eastern Daylight Time)

On Thu, 4 Sep 2014, Robert Gieseke wrote:

> Hi,
>
> Am 04/09/14 um 16:04 schrieb Mitchell:
>> I cannot reproduce the issue on my Mac OSX 10.6.2 installation. Here
>> is
>> what I did to investigate:
>>
>> 1. Open a new buffer.
>> 2. Use the command entry to enter "use_tabs=true"
>> 3. Enter command "tab_width=4"
>> 4. Enter command "view_ws=1"
>> 5. [Optional] Type something similar to your original screenshot to
>> verify the characters are lining up correctly (worked for me).
>> 6. Enter command "=buffer:text_width(32,'1234\t')"
>> 7. Note the result (57 for me with Monaco font size 12).
>> 8. Switch back to the previous buffer and enter command
>> "=buffer:text_width(32,'12341234')".
>> 9. Note the result (again, 57, verifying tabs are drawn correctly).
>> 10. I'm guessing that your #7 and #9 results are different, thus the
>> offset error.
>>
>> Can anyone else reproduce non-matching #7 and #9 on Mac OSX following
>> the steps above? Please report your version numbers too. Thanks.
>
> I can confirm the mis-alignment *and* that your procedure gives 57 for
> both text_width commands on OS X 10.9.4 (and for different fonts as
> well).
>
> There has been a discussion of a similar problem on Scintilla-Interest,
> but I'm not sure if it could be related:
> https://groups.google.com/forum/#!searchin/scintilla-interest/tab$20width/scintilla-interest/mkPGZNURM88/QyxAtkkLcTwJ

Okay, change step #6 to be:

6. Position the caret on a tab character and enter command
    "=buffer:text_width(style_at[current_pos],'1234\t')"

and change #8 to be:

8. Position the caret on a number and enter command
    "=buffer:text_width(style_at[current_pos],'12341234')"

Then compare the two results (still 57 vs 57 for me).

Also let me know which lexer is being used too.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 04 Sep 2014 - 11:06:51 EDT

This archive was generated by hypermail 2.2.0 : Fri 05 Sep 2014 - 06:32:02 EDT