mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: scrolling: mark selection top if-statement as 'unlikely'
This commit is contained in:
parent
96a4f1b993
commit
52e6a751b3
1 changed files with 4 additions and 4 deletions
|
|
@ -1748,8 +1748,8 @@ term_scroll_partial(struct terminal *term, struct scroll_region region, int rows
|
|||
rows = min(rows, region.end - region.start);
|
||||
|
||||
/* Cancel selections that cannot be scrolled */
|
||||
if (term->selection.start.row != -1) {
|
||||
if (term->selection.end.row != -1) {
|
||||
if (unlikely(term->selection.start.row != -1)) {
|
||||
if (likely(term->selection.end.row != -1)) {
|
||||
/*
|
||||
* Selection is (partly) inside either the top or bottom
|
||||
* scrolling regions, or on (at least one) of the lines
|
||||
|
|
@ -1820,8 +1820,8 @@ term_scroll_reverse_partial(struct terminal *term,
|
|||
rows = min(rows, region.end - region.start);
|
||||
|
||||
/* Cancel selections that cannot be scrolled */
|
||||
if (term->selection.start.row != -1) {
|
||||
if (term->selection.end.row != -1) {
|
||||
if (unlikely(term->selection.start.row != -1)) {
|
||||
if (likely(term->selection.end.row != -1)) {
|
||||
/*
|
||||
* Selection is (partly) inside either the top or bottom
|
||||
* scrolling regions, or on (at least one) of the lines
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue