Saturday, February 18, 2023

Cannot delete eol arounded by multibyte characters when auto-format is set

Hi,

I have trouble in using auto-format in vim to format Chinese characters. The eol in a formatted paragraph can not be deleted in insert mode when formatoptions is set to "tcqmBa".

To reproduce the trouble:

1. vim --clean
2. insert the following text.

你好,你是谁?你从哪里来?你要到哪里去?
你好,你是谁?你从哪里来?你要到哪里去?
你好,你是谁?你从哪里来?你要到哪里去?
你好,你是谁?你从哪里来?你要到哪里去?

3. :set formatoptions=tcqmBa
4. visual select the four-lines text and press "gq" to format.
5. then the formatted text is supposed to have 2 lines.
6. move the cursor to the beginning of the second line and press i to insert
7. press backspace or <c-w> <c-h>. the eol in front of the cursor can not be deleted.

Expected behavior:

the eol  would be deleted so that the characters in the first line is able to be deleted.

vim version: v9.0.1321
OS: Debian GNU/Linux 11 (bullseye)

Is this problem a bug or could someone give me some suggestions to achieve the goal? Thanks a lot!

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/cf3dbdea-0666-4123-be52-cea2205f04c9n%40googlegroups.com.

No comments:

Post a Comment