mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
term: insert: move assert() after checking whether insert mode is enabled or not
This commit is contained in:
parent
01c3a2635d
commit
ca7ec13f3b
1 changed files with 2 additions and 2 deletions
|
|
@ -2364,11 +2364,11 @@ print_linewrap(struct terminal *term)
|
|||
static inline void
|
||||
print_insert(struct terminal *term, int width)
|
||||
{
|
||||
assert(width > 0);
|
||||
|
||||
if (likely(!term->insert_mode))
|
||||
return;
|
||||
|
||||
assert(width > 0);
|
||||
|
||||
struct row *row = term->grid->cur_row;
|
||||
const size_t move_count = max(0, term->cols - term->grid->cursor.point.col - width);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue