Commit: 47d920130d77b3f255cdde28c159d212cf056c93
Parent: 01f3c528dfe72fe533b81913b854e0b6a8ddd77f
Author: Randy Palamar
Date: Thu, 14 Nov 2024 21:11:19 -0700
avoid render buffer refill when selection hasn't changed
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/vtgl.c b/vtgl.c
@@ -677,6 +677,8 @@ update_selection(Term *t, TerminalInput *input)
new_p.x--;
}
+ Range old_range = sel->range;
+
if (sel->state != SS_WORDS) {
sel->range.start = sel->anchor.start;
sel->range.end = new_p;
@@ -699,7 +701,8 @@ update_selection(Term *t, TerminalInput *input)
}
}
sel->range = normalize_range(sel->range);
- t->gl.flags |= UPDATE_RENDER_BUFFER;
+ if (!equal_range(old_range, sel->range))
+ t->gl.flags |= UPDATE_RENDER_BUFFER;
}
KEYBIND_FN(copy)