ui: updates TODO.md

This commit is contained in:
2026-05-13 18:26:39 +03:00
parent 42d72e2464
commit 95c8e56559
4 changed files with 12 additions and 6 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
/* #include "../file_processor.h"
#include "../windows/fs_file_list.h"
#include "group.h"
#include "widget_core.h"
#include <ncursesw/ncurses.h>
@@ -11,7 +12,7 @@ void upload_dialogue_modal_cb(w_cb_args_t *args) {
app_t *app = args->app;
w_dialogue_t *d = (w_dialogue_t *)app->active_widget;
memcpy(&d_args, args, sizeof(w_cb_args_t));
/* d_args.app = NULL; */
d_args.app = NULL;
d_args.element = app->active_widget;
w_dialogue_callback_default(&d_args);
w_lfl_ui_t *fui = (w_lfl_ui_t *)d->g_content->elements[0].element;
+6 -3
View File
@@ -19,6 +19,7 @@ bool w_input_default_key_action(w_cb_args_t *args) {
wchar_t w_key[2];
app_t *app = args->app;
char long_key[3];
int short_val_len = 1;
switch (key) {
case KEY_BACKSPACE:
@@ -36,22 +37,24 @@ bool w_input_default_key_action(w_cb_args_t *args) {
default:
if (input->value_len == input->max_len) break;
long_key[0] = key;
input->value_len++;
if ((key & 0xC0) == 0xC0) {
long_key[1] = wgetch(app->win);
long_key[2] = '\0';
short_val_len++;
} else {
long_key[1] = '\0';
}
mbstowcs(w_key, (const char *)&long_key, 2);
if (input->cur_pos > 0) {
start_pos = input->value_len++ - input->cur_pos;
start_pos = input->value_len - input->cur_pos;
memmove(input->value + start_pos + 1, input->value + start_pos,
input->value_len - start_pos);
input->value[start_pos] = key;
strcpy(input->value + start_pos, long_key);
input->w_value[start_pos] = w_key[0];
} else {
input->value[input->value_len++] = key;
input->value[input->value_len] = '\0';
strcpy(input->value + input->value_len, long_key);
input->w_value[input->value_len - 1] = w_key[0];
input->w_value[input->value_len] = '\0';
+1 -1
View File
@@ -11,7 +11,7 @@
typedef struct {
w_t w;
wchar_t w_value[INPUT_TEXT];
char value[INPUT_TEXT];
char value[INPUT_TEXT*2];
int32_t cur_pos; /* is relative to the end of a string */
int32_t value_len;
int32_t max_len;