panel: Fix

This commit is contained in:
Alastair Poole 2020-04-29 01:09:26 +01:00
parent a5aa6c2ee5
commit ecfbe9c608
1 changed files with 11 additions and 6 deletions

View File

@ -995,15 +995,20 @@ edi_mainview_panel_goto_end(Edi_Mainview_Panel *panel)
if (row <= 0) return; if (row <= 0) return;
line = elm_code_file_line_get(code->file, row); 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') for (ch = line->content; *ch; ch++)
length += tabstop; {
else if (*ch == '\t')
length++; length += tabstop;
else
length++;
}
} }
else
length = line->length;
elm_code_widget_cursor_position_set(editor->entry, elm_code_file_lines_get(code->file), length); elm_code_widget_cursor_position_set(editor->entry, elm_code_file_lines_get(code->file), length);
} }