template: Fix undo error by correcting cursor position
Summary: There is a memorizing cursor in wrong position, it cause undo error. If insert the description template, undo operation is not working correctly. @fix Test Plan: 1. press ctrl + t in the part, then insert description part 2. press ctrl + z, undo the code 3. see the normal operation Reviewers: Hermet, Jaehyun_Cho, NikaWhite Differential Revision: https://phab.enlightenment.org/D3760
This commit is contained in:
parent
3cb3dfdda7
commit
26570d64c0
|
@ -369,15 +369,15 @@ template_insert(edit_data *ed, Enventor_Template_Insert_Type insert_type,
|
|||
|
||||
if (!t) goto end;
|
||||
|
||||
int cursor_pos = elm_entry_cursor_pos_get(entry);
|
||||
int cursor_pos1 = elm_entry_cursor_pos_get(entry);
|
||||
|
||||
if (strcmp(paragh, "images"))
|
||||
{
|
||||
elm_entry_entry_insert(entry, p);
|
||||
elm_entry_entry_insert(entry, first_line);
|
||||
}
|
||||
|
||||
int cursor_pos = elm_entry_cursor_pos_get(entry);
|
||||
int cursor_pos1 = elm_entry_cursor_pos_get(entry);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < (line_cnt - 1); i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue