From: Mark Jamsek Subject: tog: fix log search when in horizontal split To: Game of Trees Date: Tue, 27 Dec 2022 00:18:17 +1100 repro: Open a commit from the log view, 'S'witch to hsplit, TAB back to the log and press '/' to search. No input prompt is presented. This happens because we block input to the wrong view when in hsplit; after the view/v dance to echo to the bottom of the screen we need to stick with the "v" view variable. Simple fix: replace the two mistaken "view" instances with "v" in the nodelay() calls. ----------------------------------------------- commit a14f7b3f31efe5e42bdc59f5e67d0d20469a1c69 (main) from: Mark Jamsek date: Mon Dec 26 13:09:21 2022 UTC tog: fix typo that breaks log search when in hsplit Ironically, the typo "blocks" log search when in hsplit because we block input on the wrong view! Pass the proper "v" view to nodelay() calls. diff 9430e858d160f9d3dbd02b218b5c0a95e266a199 a14f7b3f31efe5e42bdc59f5e67d0d20469a1c69 commit - 9430e858d160f9d3dbd02b218b5c0a95e266a199 commit + a14f7b3f31efe5e42bdc59f5e67d0d20469a1c69 blob - d16e7c64d5614b5a492b3e1f0528b8742b178362 blob + 3dbe897e48fdd71e921866059a833b96b7777482 --- tog/tog.c +++ tog/tog.c @@ -1308,14 +1308,14 @@ view_search_start(struct tog_view *view) mvwaddstr(v->window, v->nlines - 1, 0, "/"); wclrtoeol(v->window); - nodelay(view->window, FALSE); /* block for search term input */ + nodelay(v->window, FALSE); /* block for search term input */ nocbreak(); echo(); ret = wgetnstr(v->window, pattern, sizeof(pattern)); wrefresh(v->window); cbreak(); noecho(); - nodelay(view->window, TRUE); + nodelay(v->window, TRUE); if (ret == ERR) return NULL; -- Mark Jamsek GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68