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

git pushed a commit to branch master
in repository edi.

View the commit online.

commit e2b55bf309738b84919d1ecbed1b0cff58d247de
Author: Alastair Poole <[email protected]>
AuthorDate: Fri Apr 24 13:38:12 2026 +0100

    mainview: fix select all on empty buffer
    
    There's always something.
---
 src/bin/mainview/edi_mainview.c       | 19 +++++++++++++++++++
 src/bin/mainview/edi_mainview_panel.c |  2 +-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/bin/mainview/edi_mainview.c b/src/bin/mainview/edi_mainview.c
index 7dc919e..382b29b 100644
--- a/src/bin/mainview/edi_mainview.c
+++ b/src/bin/mainview/edi_mainview.c
@@ -397,8 +397,27 @@ edi_mainview_paste()
 void
 edi_mainview_select_all()
 {
+   Edi_Mainview_Item *item;
+   Edi_Editor *editor;
+   Elm_Code *code;
+
    if (edi_mainview_is_empty()) return;
 
+   item = edi_mainview_item_current_get();
+   if (!item || !item->view)
+     return;
+
+   editor = (Edi_Editor *)evas_object_data_get(item->view, "editor");
+   if (!editor || !editor->entry)
+     return;
+
+   code = elm_code_widget_code_get(editor->entry);
+   if (!code || elm_code_file_lines_get(code->file) <= 0)
+     {
+        elm_object_focus_set(editor->entry, EINA_TRUE);
+        return;
+     }
+
    edi_mainview_panel_select_all(_current_panel);
 }
 
diff --git a/src/bin/mainview/edi_mainview_panel.c b/src/bin/mainview/edi_mainview_panel.c
index 974f1a4..87ca1b5 100644
--- a/src/bin/mainview/edi_mainview_panel.c
+++ b/src/bin/mainview/edi_mainview_panel.c
@@ -891,7 +891,7 @@ edi_mainview_panel_save(Edi_Mainview_Panel *panel)
      return;
 
    editor = (Edi_Editor *)evas_object_data_get(panel->current->view, "editor");
-   if (!editor)
+   if (!editor || !editor->entry)
      return;
 
    edi_editor_save(editor);

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

Reply via email to