summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormongo <mongo@iomega>2016-04-14 17:03:32 -0300
committermongo <mongo@iomega>2016-04-14 17:03:32 -0300
commit11c668b55b280f00f3acd2ee6c7ae6a4570b5da6 (patch)
treee625d06c27289ec66c27921f69830ee71b9a196d
parent4e102657f3714fa7ba14270970554fb90ebbb82f (diff)
Fix in 'a' and 'A' commands
-rwxr-xr-xsrc.scim2/cmds_edit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src.scim2/cmds_edit.c b/src.scim2/cmds_edit.c
index 307b5ed..23e37d9 100755
--- a/src.scim2/cmds_edit.c
+++ b/src.scim2/cmds_edit.c
@@ -95,15 +95,15 @@ void do_editmode(struct block * sb) {
return;
} else if (sb->value == L'a') { // a
- inputline_pos += wcwidth(inputline[real_inputline_pos]);
real_inputline_pos++;
+ inputline_pos = wcswidth(inputline, real_inputline_pos);
chg_mode(insert_edit_submode);
show_header(input_win);
return;
} else if (sb->value == L'A') { // A
- inputline_pos = wcswidth(inputline, wcslen(inputline));
real_inputline_pos = wcslen(inputline);
+ inputline_pos = wcswidth(inputline, real_inputline_pos);
chg_mode(insert_edit_submode);
show_header(input_win);
return;