commit a75687f16688a6c226dca210fde49eedac286b09
parent 225b064c19ce96a38c5472b3d73367922f671dc7
Author: lumidify <nobody@lumidify.org>
Date: Sat, 4 Nov 2023 19:46:06 +0100
Only call resize function when size of window has actually changed
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ledit.c b/ledit.c
@@ -1,5 +1,3 @@
-/* FIXME: On large files, expose event takes a long time for some reason
- -> but somehow only sometimes... */
/* FIXME: generally optimize redrawing */
/* FIXME: Just use int for everything? size_t just doesn't seem to be worth it */
/* FIXME: Make scrolling more smooth */
diff --git a/window.c b/window.c
@@ -955,6 +955,8 @@ window_handle_filtered_events(ledit_window *window) {
void
window_resize(ledit_window *window, int w, int h) {
+ if (w == window->w && h == window->h)
+ return;
window->w = w;
window->h = h;
if (window->message_shown) {