Re: [dev] [PATCH] Don't insert newlines in wrapped lines

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Sat, 10 Aug 2013 16:30:59 +0200

> > The solution is easy,
> > don't add the newline when there is a character in the last position
> > of the row.
>
> This isn't the desired behavior when you fill the line up with exactly
> the right number of characters. Just an edge case not to care about?

You are right, the correct solution is looking if the row has the
wrap attribute set, and it is already done in:

    963 if(y < sel.ne.y && !((gp-1)->mode & ATTR_WRAP))
    964 *ptr++ = '\n';

My (incorrect) patch modified:

    977 if(i < ex)
    978 *ptr++ = '\n';

which is used only in the last line of the selection, so it is not related
to the problem of Dmitry Potapov. Like we have seen, the problem was
already fixed and it isn't necessary any change.



-- 
Roberto E. Vargas Caballero
----------------------------
k0ga_AT_shike2.com
http://www.shike2.com
Received on Sat Aug 10 2013 - 16:30:59 CEST

This archive was generated by hypermail 2.3.0 : Sat Aug 10 2013 - 16:36:06 CEST