diff options
Diffstat (limited to 'sdn.cpp')
-rw-r--r-- | sdn.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1186,8 +1186,13 @@ fun handle_editor (wint_t c) { g.editor_on_confirm = nullptr; break; case ACTION_INPUT_B_DELETE: - if (g.editor_cursor > 0) - g.editor_line.erase (--g.editor_cursor, 1); + // Remove the last character including its postfix combining characters + while (g.editor_cursor > 0) { + auto erased = g.editor_line.at (--g.editor_cursor); + g.editor_line.erase (g.editor_cursor, 1); + if (wcwidth (erased)) + break; + } break; default: if (c & (ALT | SYM)) { |