diff src/ex_docmd.c @ 26096:e353ace59e62 v8.2.3581

patch 8.2.3581: reading character past end of line Commit: https://github.com/vim/vim/commit/0b5b06cb4777d1401fdf83e7d48d287662236e7e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 4 15:10:11 2021 +0000 patch 8.2.3581: reading character past end of line Problem: Reading character past end of line. Solution: Correct the cursor column.
author Bram Moolenaar <Bram@vim.org>
date Thu, 04 Nov 2021 16:15:04 +0100
parents 377a7686a52f
children fa8161b003f6
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7774,6 +7774,7 @@ ex_put(exarg_T *eap)
 	eap->forceit = TRUE;
     }
     curwin->w_cursor.lnum = eap->line2;
+    check_cursor_col();
     do_put(eap->regname, NULL, eap->forceit ? BACKWARD : FORWARD, 1L,
 						       PUT_LINE|PUT_CURSLINE);
 }