Bram Moolenaar wrote:
Yukihiro Nakadaira wrote:
There are two problems in block insert mode (<C-V> + I).
1. When CTRL-C is used in block insert mode, text is inserted to first
line only even if multi-line was selected.
For example, when there are three lines and type "1G<C-V>jjIxxx<C-C>"
1: aaa 1: xxxaaa
2: bbb -> 2: bbb
3: ccc 3: ccc
Please see op_insert() function in ops.c. After invoking edit(),
got_int is TRUE when CTRL-C was used. Then u_save() returns FAIL and
block_insert() is not invoked. Thus text is not inserted to other line.
I think that is how it's supposed to happen: You abort the insertion
with CTRL-C, thus further changes are not done.
It makes sense. But CTRL-C can be used in Vim6. So I want to use
CTRL-C to enter the block inserting, if possible. Perhaps is it
corrected feature?
2. When CTRL-C is used in block insert mode, extra undo is added.
This happens when using GUI.
For example, type "<C-V>Ixxx<C-C>" and do undo:
insert undo undo
1: -> 1: xxx -> 1: xxx -> 1:
In CUI:
insert undo
1: -> 1: xxx -> 1:
This is stacktrace explaining how extra undo is added.
That is indeed a problem. I think gotchars() should not be invoked for
peekc(). This patch should fix it, but we need to check for side
effects:
Thanks, I'll try it.
--
Yukihiro Nakadaira - [EMAIL PROTECTED]