mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 01:38:16 +00:00
vim-patch:8.2.3581: reading character past end of line
Problem: Reading character past end of line.
Solution: Correct the cursor column.
0b5b06cb47
This commit is contained in:
@@ -8133,6 +8133,7 @@ static void ex_put(exarg_T *eap)
|
|||||||
eap->forceit = TRUE;
|
eap->forceit = TRUE;
|
||||||
}
|
}
|
||||||
curwin->w_cursor.lnum = eap->line2;
|
curwin->w_cursor.lnum = eap->line2;
|
||||||
|
check_cursor_col();
|
||||||
do_put(eap->regname, NULL, eap->forceit ? BACKWARD : FORWARD, 1,
|
do_put(eap->regname, NULL, eap->forceit ? BACKWARD : FORWARD, 1,
|
||||||
PUT_LINE|PUT_CURSLINE);
|
PUT_LINE|PUT_CURSLINE);
|
||||||
}
|
}
|
||||||
|
@@ -138,6 +138,15 @@ func Test_p_with_count_leaves_mark_at_end()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_put_above_first_line()
|
||||||
|
new
|
||||||
|
let @" = 'text'
|
||||||
|
silent! normal 0o00
|
||||||
|
0put
|
||||||
|
call assert_equal('text', getline(1))
|
||||||
|
bwipe!
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_multibyte_op_end_mark()
|
func Test_multibyte_op_end_mark()
|
||||||
new
|
new
|
||||||
call setline(1, 'тест')
|
call setline(1, 'тест')
|
||||||
|
Reference in New Issue
Block a user