diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-06-27 20:03:38 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-06-27 20:03:38 +0200 |
commit | 80306c57799a4ba6382d6af7b4a67a01fdefd437 (patch) | |
tree | b5b153f19453e70f62ad38c54e0b7bbd15963861 | |
parent | b0e5055f42fd3b3c60676c4438d0142da43f8572 (diff) | |
download | tdv-80306c57799a4ba6382d6af7b4a67a01fdefd437.tar.gz tdv-80306c57799a4ba6382d6af7b4a67a01fdefd437.tar.xz tdv-80306c57799a4ba6382d6af7b4a67a01fdefd437.zip |
Skip combining marks in the editor
For slightly more correct Unicode handling.
-rw-r--r-- | src/sdtui.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sdtui.c b/src/sdtui.c index 406a780..944d168 100644 --- a/src/sdtui.c +++ b/src/sdtui.c @@ -1486,14 +1486,18 @@ app_process_user_action (Application *self, UserAction action) case USER_ACTION_INPUT_LEFT: if (self->input_pos > 0) { - self->input_pos--; + do self->input_pos--; + while (self->input_pos > 0 && g_unichar_ismark + (g_array_index (self->input, gunichar, self->input_pos))); app_redraw_top (self); } return TRUE; case USER_ACTION_INPUT_RIGHT: if (self->input_pos < self->input->len) { - self->input_pos++; + do self->input_pos++; + while (self->input_pos < self->input->len && g_unichar_ismark + (g_array_index (self->input, gunichar, self->input_pos))); app_redraw_top (self); } return TRUE; |