grid: reflow: shell integration: no need to check for >= 0

This commit is contained in:
Daniel Eklöf 2025-02-10 12:46:31 +01:00
parent 8b63869f57
commit 7445471238
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

10
grid.c
View file

@ -1068,17 +1068,11 @@ grid_resize_and_reflow(
}
}
if (unlikely(old_row->shell_integration.cmd_start >= 0 &&
old_row->shell_integration.cmd_start == c))
{
if (unlikely(old_row->shell_integration.cmd_start == c))
new_row->shell_integration.cmd_start = new_col_idx;
}
if (unlikely(old_row->shell_integration.cmd_end >= 0 &&
old_row->shell_integration.cmd_end == c))
{
if (unlikely(old_row->shell_integration.cmd_end == c))
new_row->shell_integration.cmd_end = new_col_idx;
}
if (unlikely(width > new_cols)) {
/* Wide character no longer fits on a row, replace