ui: correct reaction on arrow keys press

This commit is contained in:
2025-12-12 14:23:06 +02:00
parent dc74baecf7
commit 6018d99e07
4 changed files with 60 additions and 14 deletions
+7 -2
View File
@@ -1,5 +1,6 @@
#include "app.h"
// #include "action.h"
#include <ncurses.h>
#include <stdlib.h>
void ac_file(WINDOW *win, int is_action_w);
@@ -39,6 +40,8 @@ app_t *init_app() {
// here goes box borders
draw_borders(_app);
keypad(_app->win, TRUE);
// refresh the windows
wnoutrefresh(_app->win);
wnoutrefresh(_app->left_win);
@@ -50,9 +53,10 @@ app_t *init_app() {
void init_nc() {
initscr();
cbreak();
keypad(stdscr, TRUE);
noecho();
curs_set(0);
keypad(stdscr, TRUE);
if (!has_colors()) {
printf("Your terminal does not support color\n");
@@ -97,5 +101,6 @@ void print_bars(app_t *app) {
void destroy_app(app_t *app) {
delwin(app->win);
free(app);
// free(app);
endwin();
}