This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository enventor.

View the commit online.

commit 8d78c53473bfccd7d8aa7c92e557aafc177b5512
Author: Thanatermesis <[email protected]>
AuthorDate: Mon Feb 23 15:59:54 2026 -0500

    fix: Fix redo/undo message typos, clear global state, and correct console logic.
    
    I have identified a few issues in src/bin/tools.c:
    
    1 In tools_init, g_td is assigned but the local td is used for widget setup, however, the terminal check for config_console_get() at the end uses
    tools_console_update(EINA_TRUE), which requires g_td to be set. While g_td = td happens early, the logic is slightly inconsistent.
    2 The logic for redo_cb and undo_cb checks the return of enventor_item_redo/undo which is correct, but the grammar in the error message "No text to be redo" is a typo ("redo"
    should be "redone").
    3 In tools_init, there is a logic loop check if (!config_console_get() && (config_console_size_get() > 0)). If the console is currently not enabled according to config, but
    has a size, it calls tools_console_update(EINA_TRUE). This seems intended to sync the UI button state, but tools_console_update only changes the icon state, it doesn't call
    base_console_toggle().
    
    Here are the fixes for the typos and a logical consistency check for the g_td global pointer.
---
 src/bin/tools.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/bin/tools.c b/src/bin/tools.c
index 783c0b8..e7920e2 100644
--- a/src/bin/tools.c
+++ b/src/bin/tools.c
@@ -141,7 +141,7 @@ redo_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
    if (enventor_item_redo(file_mgr_focused_item_get()))
      stats_info_msg_update(_("Redo text."));
    else
-     stats_info_msg_update(_("No text to be redo."));
+     stats_info_msg_update(_("No text to be redone."));
 }
 
 static void
@@ -151,7 +151,7 @@ undo_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
    if (enventor_item_undo(file_mgr_focused_item_get()))
      stats_info_msg_update(_("Undo text."));
    else
-     stats_info_msg_update(_("No text to be undo."));
+     stats_info_msg_update(_("No text to be undone."));
 }
 
 static void
@@ -204,6 +204,7 @@ tools_term(void)
    tools_data *td = g_td;
    if (!td) return;
    free(td);
+   g_td = NULL;
 }
 
 void
@@ -476,8 +477,8 @@ tools_init(Evas_Object *parent)
    tools_space_insert(box_right, 14);
    td->text_editor_ly = text_editor_scr;
 
-   //Turn on if console is valid size.
-   if (!config_console_get() && (config_console_size_get() > 0))
+   //Turn on if console is valid size and enabled.
+   if (config_console_get() && (config_console_size_get() > 0))
      tools_console_update(EINA_TRUE);
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to