mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:9.1.1322: small delete register cannot paste multi-line correctly (#33531)
Problem: small delete register cannot paste multi-line correctly
(after v8.2.2189)
Solution: caused by 032a2d050b82b146d70d6ff714838ee62c07d8ad, so make
this logic handle charwise only (phanium)
closes: vim/vim#17151
7e93d4c617
This commit is contained in:
@@ -1367,7 +1367,7 @@ int insert_reg(int regname, yankreg_T *reg, bool literally_arg)
|
||||
retval = FAIL;
|
||||
} else {
|
||||
for (size_t i = 0; i < reg->y_size; i++) {
|
||||
if (regname == '-') {
|
||||
if (regname == '-' && reg->y_type == kMTCharWise) {
|
||||
Direction dir = BACKWARD;
|
||||
if ((State & REPLACE_FLAG) != 0) {
|
||||
pos_T curpos;
|
||||
@@ -1388,11 +1388,11 @@ int insert_reg(int regname, yankreg_T *reg, bool literally_arg)
|
||||
do_put(regname, NULL, dir, 1, PUT_CURSEND);
|
||||
} else {
|
||||
stuffescaped(reg->y_array[i].data, literally);
|
||||
}
|
||||
// Insert a newline between lines and after last line if
|
||||
// y_type is kMTLineWise.
|
||||
if (reg->y_type == kMTLineWise || i < reg->y_size - 1) {
|
||||
stuffcharReadbuff('\n');
|
||||
// Insert a newline between lines and after last line if
|
||||
// y_type is kMTLineWise.
|
||||
if (reg->y_type == kMTLineWise || i < reg->y_size - 1) {
|
||||
stuffcharReadbuff('\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user