diff options
| author | bfredl <bjorn.linse@gmail.com> | 2024-09-04 12:09:42 +0200 |
|---|---|---|
| committer | bfredl <bjorn.linse@gmail.com> | 2024-09-06 10:22:29 +0200 |
| commit | fa99afe35eb5d8cf01d875e12b53165bf1104a60 (patch) | |
| tree | 2a304fcd0262e71ef64d2bbb91fcbdc5eb89507d /src/nvim/textformat.c | |
| parent | 7b7c95dac97d6ea4f10855cc198dce650a796c20 (diff) | |
| download | rneovim-fa99afe35eb5d8cf01d875e12b53165bf1104a60.tar.gz rneovim-fa99afe35eb5d8cf01d875e12b53165bf1104a60.tar.bz2 rneovim-fa99afe35eb5d8cf01d875e12b53165bf1104a60.zip | |
fix(multibyte): handle backspace of wide clusters in replace mode
Make utf_head_off more robust against invalid sequences
and embedded NUL chars
Diffstat (limited to 'src/nvim/textformat.c')
| -rw-r--r-- | src/nvim/textformat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/textformat.c b/src/nvim/textformat.c index 30c7d0ee92..9095d4e8c9 100644 --- a/src/nvim/textformat.c +++ b/src/nvim/textformat.c @@ -400,7 +400,7 @@ void internal_format(int textwidth, int second_indent, int flags, bool format_on } if (second_indent >= 0) { if (State & VREPLACE_FLAG) { - change_indent(INDENT_SET, second_indent, false, NUL, true); + change_indent(INDENT_SET, second_indent, false, true); } else if (leader_len > 0 && second_indent - leader_len > 0) { int padding = second_indent - leader_len; |