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

From: Robert Gieseke <rob.g.att.web.de>
Date: Thu, 04 Sep 2014 17:29:02 +0200

Am 04/09/14 um 17:06 schrieb Mitchell:

> 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.
>

The display issue is the same for Lua or the plain text lexer.
I get 57 all the time for Lua:

print(
buffer:text_width(20,'1234\t'),
buffer:text_width(20,'12341234'),
buffer:text_width(0, '1234\t'),
buffer:text_width(0, '12341234')
)

When I run

buffer.tab_width=4;
print(buffer:text_width(20,'1234'),
buffer:text_width(20,'\t'),
buffer:text_width(0, '1234'),
buffer:text_width(0, '\t')
)

I get 28 57 28 57

'1234' is 28 px wide on my screen (measured using Xscope), so I don't
know why Tabs are always given as 57 pixels wide, even when tab_width is
set to 2.

Cheers,
Robert

-- 
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:29:02 EDT

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