diff options
| author | verdant <im@verdant.ee> | 2026-07-22 16:15:32 +0800 |
|---|---|---|
| committer | verdant <im@verdant.ee> | 2026-07-22 16:15:32 +0800 |
| commit | 40926f03b5cf422e60d2f9eec9a54375a2975db9 (patch) | |
| tree | 275d8c8dc4e4a4d59d904f043e9e201543e5c2f2 | |
| parent | 102f85eaef4ca23026f94f39854ed59f6db59fad (diff) | |
| download | sf-40926f03b5cf422e60d2f9eec9a54375a2975db9.tar.gz sf-40926f03b5cf422e60d2f9eec9a54375a2975db9.zip | |
Correct window name matching in wm_fd_w_by_name
| -rw-r--r-- | wm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4,6 +4,7 @@ #include <string.h> #include "err.h" +#include "log.h" #include "mem.h" window *wm_create_new_w(terminal *t, const char *name, int height, int width, @@ -48,8 +49,9 @@ terminal *wm_init(void) { } int wm_fd_w_by_name(terminal *t, const char *name) { + log_write(LOG_INFO, "w_count = %d", t->w_count); for (int i = 0; i < t->w_count; i++) { - if (strcmp(t->windows[i]->name, name) == 0) continue; + if (strcmp(t->windows[i]->name, name) != 0) continue; return i; } |
