Re: [dev] [st] Proposal of changing internal representation

2014-08-23 Thread q
My 2 cents, On Sat, Aug 23, 2014 at 05:35:54PM +0200, Roberto E. Vargas Caballero wrote: > I was trying a patch when I realized the problems we have in > st about the internal representation. Take a look to this loop: > > ptr = buf; > while((charsize = utf8decode(ptr, &unicodep, b

Re: [dev] [st] Proposal of changing internal representation

2014-08-23 Thread Silvan Jegen
Hi On Sat, Aug 23, 2014 at 05:35:54PM +0200, Roberto E. Vargas Caballero wrote: > [...] > > If the character is a multibyte, we decode it again. So for > multibyte characters we: > > - decode > - encode > - decode > > It is slow and really ugly. But we have this problem no

Re: [dev] [st] Proposal of changing internal representation

2014-08-23 Thread Dimitris Papastamos
On Sat, Aug 23, 2014 at 05:35:54PM +0200, Roberto E. Vargas Caballero wrote: > If the character is a multibyte, we decode it again. So for > multibyte characters we: > > - decode > - encode > - decode > > It is slow and really ugly. But we have this problem not only in > tpu

[dev] [st] Proposal of changing internal representation

2014-08-23 Thread Roberto E. Vargas Caballero
Hi, I was trying a patch when I realized the problems we have in st about the internal representation. Take a look to this loop: ptr = buf; while((charsize = utf8decode(ptr, &unicodep, buflen))) { utf8encode(unicodep, s, UTF_SIZ); tputc(s, charsize)

Re: [dev] [PATCH] Removing wrapping newlines from selection

2014-08-23 Thread Roberto E. Vargas Caballero
> Good point. What is protocol here? Should I send a v2 patch without the space? Don't worry, I will apply the commit and fix the space. Usually the protocol is send a second version, but I think is too much for a space, Regards, -- Roberto E. Vargas Caballero