summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2020-04-28 21:28:47 +0100
committerAlastair Poole <netstar@gmail.com>2020-04-28 21:28:47 +0100
commit3848c35c722b81a4966e1e0b55c177b3ddd4b9d5 (patch)
tree8bc29ed66380ae6e46fb14c69c71b09ab4f45a47
parent3c4d9529b92f278958fffbb071f276b7555a9404 (diff)
editor: shift+del
-rw-r--r--src/bin/editor/edi_editor.c4
-rw-r--r--src/bin/mainview/edi_mainview_panel.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index cd8b013..bc4c5d7 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -911,6 +911,10 @@ _smart_cb_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
{
edi_mainview_goto_popup_show();
}
+ else if (!strcmp(ev->key, "Del"))
+ {
+ edi_mainview_cut();
+ }
else if (!strcmp(ev->key, "Home"))
{
edi_mainview_goto_start();
diff --git a/src/bin/mainview/edi_mainview_panel.c b/src/bin/mainview/edi_mainview_panel.c
index 995b676..f41d145 100644
--- a/src/bin/mainview/edi_mainview_panel.c
+++ b/src/bin/mainview/edi_mainview_panel.c
@@ -970,7 +970,6 @@ edi_mainview_panel_goto_position(Edi_Mainview_Panel *panel, unsigned int row, un
elm_object_focus_set(editor->entry, EINA_TRUE);
}
-
void
edi_mainview_panel_goto_end(Edi_Mainview_Panel *panel)
{
@@ -990,13 +989,13 @@ edi_mainview_panel_goto_end(Edi_Mainview_Panel *panel)
code = elm_code_widget_code_get(editor->entry);
if (!code) return;
+ tabstop = elm_code_widget_tabstop_get(editor->entry);
+
row = elm_code_file_lines_get(code->file);
if (row <= 0) return;
line = elm_code_file_line_get(code->file, row);
- if (!line) return;
-
- tabstop = elm_code_widget_tabstop_get(editor->entry);
+ if (!line || !line->content) return;
for (ch = line->content; *ch; ch++)
{