diff options
author | Bram Moolenaar <bram@vim.org> | 2011-12-08 15:14:09 +0100 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2011-12-08 15:14:09 +0100 |
commit | 768ffb2fb04d423fc4e517e9ff2251c8fd3db07f (patch) | |
tree | 08670bf71f6d2048907e2cfe15368d94e7bcdbd3 | |
parent | 596d3164cfd5e556ad10013072fa98dc8ed938ed (diff) | |
download | vim-768ffb2fb04d423fc4e517e9ff2251c8fd3db07f.tar.gz |
Problem: :wundo and :rundo use a wrong checksum.
Solution: Include the last line when computing the hash. (Christian Brabandt)
-rw-r--r-- | src/undo.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -719,7 +719,7 @@ u_compute_hash(hash) char_u *p; sha256_start(&ctx); - for (lnum = 1; lnum < curbuf->b_ml.ml_line_count; ++lnum) + for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum) { p = ml_get(lnum); sha256_update(&ctx, p, (UINT32_T)(STRLEN(p) + 1)); diff --git a/src/version.c b/src/version.c index ec69cb19..55dba1e0 100644 --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 367, +/**/ 366, /**/ 365, |