summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2020-04-29 01:09:26 +0100
committerAlastair Poole <netstar@gmail.com>2020-04-29 01:09:26 +0100
commitecfbe9c608b0ab3ecb0fa86abfd15b8dbd3249e9 (patch)
treed39d830c145b46440c2f4f1f0b5691f7f1741a4c
parenta5aa6c2ee5c81388a19415ff69ae76fc748e8a37 (diff)
panel: Fix
-rw-r--r--src/bin/mainview/edi_mainview_panel.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/bin/mainview/edi_mainview_panel.c b/src/bin/mainview/edi_mainview_panel.c
index f41d145..05eac1b 100644
--- a/src/bin/mainview/edi_mainview_panel.c
+++ b/src/bin/mainview/edi_mainview_panel.c
@@ -995,15 +995,20 @@ edi_mainview_panel_goto_end(Edi_Mainview_Panel *panel)
if (row <= 0) return;
line = elm_code_file_line_get(code->file, row);
- if (!line || !line->content) return;
+ if (!line) return;
- for (ch = line->content; *ch; ch++)
+ if (line->content)
{
- if (*ch == '\t')
- length += tabstop;
- else
- length++;
+ for (ch = line->content; *ch; ch++)
+ {
+ if (*ch == '\t')
+ length += tabstop;
+ else
+ length++;
+ }
}
+ else
+ length = line->length;
elm_code_widget_cursor_position_set(editor->entry, elm_code_file_lines_get(code->file), length);
}