File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -507,9 +507,15 @@ def handle_backspace(converted_string, raw_sequence):
507507 deleted_char = converted_string [- 1 ]
508508 converted_string = converted_string [:- 1 ]
509509
510- index = raw_sequence .rfind (deleted_char )
511- raw_sequence = raw_sequence [:- 2 ] if index < 0 else \
512- raw_sequence [:index ] + \
513- raw_sequence [(index + 1 ):]
510+ _accent = accent .get_accent_char (deleted_char )
511+ _mark = mark .get_mark_char (deleted_char )
512+
513+ if _mark and _accent :
514+ raw_sequence = raw_sequence [:- 3 ]
515+ elif _mark or _accent :
516+ raw_sequence = raw_sequence [:- 2 ]
517+ else :
518+ index = raw_sequence .rfind (deleted_char )
519+ raw_sequence = raw_sequence [:index ] + raw_sequence [(index + 1 ):]
514520
515521 return converted_string , raw_sequence
You can’t perform that action at this time.
0 commit comments