comparison src/undo.c @ 3194:972bd3fca556 v7.3.367

updated for version 7.3.367 Problem: :wundo and :rundo use a wrong checksum. Solution: Include the last line when computing the hash. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Thu, 08 Dec 2011 15:14:09 +0100
parents 26fb122355d4
children 74d51b51f3e6
comparison
equal deleted inserted replaced
3193:4f75e3e54ff3 3194:972bd3fca556
717 context_sha256_T ctx; 717 context_sha256_T ctx;
718 linenr_T lnum; 718 linenr_T lnum;
719 char_u *p; 719 char_u *p;
720 720
721 sha256_start(&ctx); 721 sha256_start(&ctx);
722 for (lnum = 1; lnum < curbuf->b_ml.ml_line_count; ++lnum) 722 for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum)
723 { 723 {
724 p = ml_get(lnum); 724 p = ml_get(lnum);
725 sha256_update(&ctx, p, (UINT32_T)(STRLEN(p) + 1)); 725 sha256_update(&ctx, p, (UINT32_T)(STRLEN(p) + 1));
726 } 726 }
727 sha256_finish(&ctx, hash); 727 sha256_finish(&ctx, hash);