From f3830aa8543f10109dce7e6effaaf8e9a25d092f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 2 Feb 2024 15:12:17 +0530 Subject: [PATCH] Avoid unnecessary if --- kitty/screen.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kitty/screen.c b/kitty/screen.c index f62db4241..64f8d4d09 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -1534,9 +1534,7 @@ screen_reverse_scroll_and_fill_from_scrollback(Screen *self, unsigned int count) void screen_carriage_return(Screen *self) { - if (self->cursor->x != 0) { - self->cursor->x = 0; - } + self->cursor->x = 0; } void