Re: [dev] [st] [PATCH] Clear selection when tclearregion() touches its range.

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Wed, 24 Apr 2013 01:35:04 +0200

> _AT_@ -1425,6 +1425,9 @@ tclearregion(int x1, int y1, int x2, int y2) {
> for(x = x1; x <= x2; x++) {
> term.line[y][x] = term.c.attr;
> memcpy(term.line[y][x].c, " ", 2);
> + if(selected(x, y)) {
> + sel.bx = -1;
> + }
> }
> }
> }


In your patch you disable the selection, and like the line is dirty is
good. But in the case the selection takes more of one line you can have
problems, because maybe not all the lines of the selection are affected by
the clear command, so we need mark all of them like dirty. This is the
reason my patch calls to selclear and not set the value of sel.bx
directly. I'm sorry but I am going to send my patch :P
Received on Wed Apr 24 2013 - 01:35:04 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 24 2013 - 01:36:04 CEST