diff options
author | John Hawthorn <john@hawthorn.email> | 2018-09-23 11:52:58 -0700 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2018-09-23 13:27:27 -0700 |
commit | 5cf38d6d9494e38e007b14973366239ce637a6ae (patch) | |
tree | 59c67c576c44e033f83e13afd4a93227038372df | |
parent | 709bfa01dceaa8caef2d697ed590066d08dd5dba (diff) |
Use do {} while in action_del_char
-rw-r--r-- | src/tty_interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tty_interface.c b/src/tty_interface.c index 395ba0d..f366a23 100644 --- a/src/tty_interface.c +++ b/src/tty_interface.c @@ -148,9 +148,9 @@ static void action_del_char(tty_interface_t *state) { } size_t original_cursor = state->cursor; - state->cursor--; - while (!is_boundary(state->search[state->cursor]) && state->cursor) + do { state->cursor--; + } while (!is_boundary(state->search[state->cursor]) && state->cursor); memmove(&state->search[state->cursor], &state->search[original_cursor], length - original_cursor + 1); } |