Re: [dev] [PATCH] [st 1/3] Use tsetdirt in tscrollup and tscrolldown.

From: <noname_AT_inventati.org>
Date: Tue, 22 Apr 2014 23:49:11 +0400

On Tue, Apr 22, 2014 at 09:34:58PM +0200, Roberto E. Vargas Caballero wrote:
> Hi,
>
> I like these patches, and I want to apply them, but there is a
> small thing that I think should be modified. After the patches tscolldown
> has:
>
> tsetdirt(orig, term.bot-n);
> tclearregion(0, term.bot-n+1, term.col-1, term.bot);
>
> but tscrollup has:
>
> tclearregion(0, orig, term.col-1, orig+n-1);
> tsetdirt(orig+n, term.bot);
>
> Is there any reason to do it in different order?. I think is more
> understable if the order is the same in both cases.

They are sorted by row number.

In tscrolldown we set dirty
        orig..term.bot-n
and then
        term.bot-n+1..term.bot

In tscrollup we set dirty
        orig..orig+n-1
and then
        orig+n..term.bot

If you concatenate these ranges, you get orig..term.bot.
Received on Tue Apr 22 2014 - 21:49:11 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 22 2014 - 22:00:09 CEST