refactor(undo): don't assume curbuf in u_compute_hash

This commit is contained in:
Thomas Vigouroux
2021-07-09 15:10:49 +02:00
parent 9132b76da6
commit ff53c5585f
5 changed files with 20 additions and 24 deletions

View File

@@ -8010,16 +8010,16 @@ static void ex_wundo(exarg_T *eap)
{
char_u hash[UNDO_HASH_SIZE];
u_compute_hash(hash);
u_write_undo((char *) eap->arg, eap->forceit, curbuf, hash);
u_compute_hash(curbuf, hash);
u_write_undo((char *)eap->arg, eap->forceit, curbuf, hash);
}
static void ex_rundo(exarg_T *eap)
{
char_u hash[UNDO_HASH_SIZE];
u_compute_hash(hash);
u_read_undo((char *) eap->arg, hash, NULL);
u_compute_hash(curbuf, hash);
u_read_undo((char *)eap->arg, hash, NULL);
}
/// ":redo".