| ... | ... |
@@ -148,9 +148,9 @@ static void action_del_char(tty_interface_t *state) {
|
| 148 | 148 |
} |
| 149 | 149 |
size_t original_cursor = state->cursor; |
| 150 | 150 |
|
| 151 |
- state->cursor--; |
|
| 152 |
- while (!is_boundary(state->search[state->cursor]) && state->cursor) |
|
| 151 |
+ do {
|
|
| 153 | 152 |
state->cursor--; |
| 153 |
+ } while (!is_boundary(state->search[state->cursor]) && state->cursor); |
|
| 154 | 154 |
|
| 155 | 155 |
memmove(&state->search[state->cursor], &state->search[original_cursor], length - original_cursor + 1); |
| 156 | 156 |
} |