mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 14:16:18 +00:00
Check if the range is invalid using start,end rather than length since
it will never be negative.
This commit is contained in:
@@ -2090,16 +2090,16 @@ screen_write_collect_flush_line(struct screen_write_ctx *ctx, u_int y)
|
|||||||
if (c_start + xoff > r_end || c_end + xoff < r_start)
|
if (c_start + xoff > r_end || c_end + xoff < r_start)
|
||||||
continue;
|
continue;
|
||||||
if (r_start > c_start + xoff)
|
if (r_start > c_start + xoff)
|
||||||
w_start = c_start + (r_start - c_start + xoff);
|
w_start = r_start - xoff;
|
||||||
else
|
else
|
||||||
w_start = c_start;
|
w_start = c_start;
|
||||||
if (c_end + xoff > r_end)
|
if (c_end + xoff > r_end)
|
||||||
w_end = c_end - (c_end + xoff - r_end);
|
w_end = r_end - xoff;
|
||||||
else
|
else
|
||||||
w_end = c_end;
|
w_end = c_end;
|
||||||
w_length = w_end - w_start;
|
if (w_end <= w_start)
|
||||||
if (w_length <= 0)
|
|
||||||
continue;
|
continue;
|
||||||
|
w_length = w_end - w_start;
|
||||||
|
|
||||||
screen_write_set_cursor(ctx, w_start, y);
|
screen_write_set_cursor(ctx, w_start, y);
|
||||||
if (ci->type == CLEAR) {
|
if (ci->type == CLEAR) {
|
||||||
|
|||||||
Reference in New Issue
Block a user