summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-01-27 14:41:15 +0000
committerBram Moolenaar <Bram@vim.org>2005-01-27 14:41:15 +0000
commit677ee6890d12218461196f5df92b4dc3d0e52129 (patch)
treec59a8f9d1b14e8c3abc4929c2b5f7a2b71698bdb /src/ops.c
parent10de2da0f567ae615913fe6bc9831590436af4e5 (diff)
downloadvim-git-677ee6890d12218461196f5df92b4dc3d0e52129.tar.gz
updated for version 7.0045
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ops.c b/src/ops.c
index ddc0aab3d..4a052925d 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -813,6 +813,7 @@ valid_yank_reg(regname, writing)
/*
* Set y_current and y_append, according to the value of "regname".
* Cannot handle the '_' register.
+ * Must only be called with a valid register name!
*
* If regname is 0 and writing, use register 0
* If regname is 0 and reading, use previous register
@@ -2996,10 +2997,11 @@ copy_yank_reg(reg)
#endif
/*
- * put contents of register "regname" into the text
- * flags: PUT_FIXINDENT make indent look nice
- * PUT_CURSEND leave cursor after end of new text
- * PUT_LINE force linewise put (":put")
+ * Put contents of register "regname" into the text.
+ * Caller must check "regname" to be valid!
+ * "flags": PUT_FIXINDENT make indent look nice
+ * PUT_CURSEND leave cursor after end of new text
+ * PUT_LINE force linewise put (":put")
*/
void
do_put(regname, dir, count, flags)
@@ -3635,6 +3637,7 @@ end:
if (regname == '=')
vim_free(y_array);
}
+ /* If the cursor is past the end of the line put it at the end. */
if (gchar_cursor() == NUL
&& curwin->w_cursor.col > 0
&& !(restart_edit || (State & INSERT)))