--- lbbs/src/editor.c 2025/09/28 11:18:28 1.41 +++ lbbs/src/editor.c 2025/10/01 02:49:13 1.43 @@ -19,6 +19,7 @@ #include "editor.h" #include "io.h" #include "log.h" +#include "login.h" #include "memory_pool.h" #include "str_process.h" #include @@ -743,6 +744,12 @@ int editor_display(EDITOR_DATA *p_editor { BBS_last_access_tm = time(NULL); + // Refresh current action while user input + if (user_online_update(NULL) < 0) + { + log_error("user_online_update(NULL) error\n"); + } + if (str_len == 0) // ch >= 32 && ch < 127 { input_str[0] = (char)ch; @@ -807,7 +814,7 @@ int editor_display(EDITOR_DATA *p_editor { col_pos = 1; } - if (ch != CR) + if (offset_out > 0) { col_pos += (str_len == 1 ? 1 : 2); } @@ -832,6 +839,12 @@ int editor_display(EDITOR_DATA *p_editor { BBS_last_access_tm = time(NULL); + // Refresh current action while user input + if (user_online_update(NULL) < 0) + { + log_error("user_online_update(NULL) error\n"); + } + if (ch == BACKSPACE) { if (line_current - output_current_row + row_pos <= 0 && col_pos <= 1) // Forbidden @@ -1122,6 +1135,12 @@ int editor_display(EDITOR_DATA *p_editor BBS_last_access_tm = time(NULL); + // Refresh current action while user input + if (user_online_update(NULL) < 0) + { + log_error("user_online_update(NULL) error\n"); + } + if (input_ok) { break;