summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-01-03 21:02:03 +0000
committerBram Moolenaar <Bram@vim.org>2005-01-03 21:02:03 +0000
commitd7ee7ce2318d5739a325dce2b86eb526d46015f4 (patch)
treeaa51cd784c743659b19e1223649e0932b1f7533e /src/ops.c
parentf9980f116b6081b0e9e90dac0c2db1c11509f40a (diff)
downloadvim-git-d7ee7ce2318d5739a325dce2b86eb526d46015f4.tar.gz
updated for version 7.0029
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ops.c b/src/ops.c
index b17effe9b..ddc0aab3d 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -5149,7 +5149,13 @@ write_viminfo_registers(fp)
if (i == TILDE_REGISTER)
continue;
#endif
+ /* Skip empty registers. */
num_lines = y_regs[i].y_size;
+ if (num_lines == 0
+ || (num_lines == 1 && y_regs[i].y_type == MCHAR
+ && STRLEN(y_regs[i].y_array[0]) == 0))
+ continue;
+
if (max_kbyte > 0)
{
/* Skip register if there is more text than the maximum size. */