comparison src/ex_docmd.c @ 2214:f8222d1f9a73 vim73

Included patch for persistent undo. Lots of changes and added test.
author Bram Moolenaar <bram@vim.org>
date Sun, 23 May 2010 23:34:36 +0200
parents 8c6a66e2b3cc
children cccb71c2c5c1
comparison
equal deleted inserted replaced
2213:0e0e99d1092e 2214:f8222d1f9a73
241 # define ex_mkspell ex_ni 241 # define ex_mkspell ex_ni
242 # define ex_spelldump ex_ni 242 # define ex_spelldump ex_ni
243 # define ex_spellinfo ex_ni 243 # define ex_spellinfo ex_ni
244 # define ex_spellrepall ex_ni 244 # define ex_spellrepall ex_ni
245 #endif 245 #endif
246 #ifndef FEAT_PERSISTENT_UNDO
247 # define ex_rundo ex_ni
248 # define ex_wundo ex_ni
249 #endif
246 #ifndef FEAT_MZSCHEME 250 #ifndef FEAT_MZSCHEME
247 # define ex_mzscheme ex_script_ni 251 # define ex_mzscheme ex_script_ni
248 # define ex_mzfile ex_ni 252 # define ex_mzfile ex_ni
249 #endif 253 #endif
250 #ifndef FEAT_PERL 254 #ifndef FEAT_PERL
296 static void ex_submagic __ARGS((exarg_T *eap)); 300 static void ex_submagic __ARGS((exarg_T *eap));
297 static void ex_join __ARGS((exarg_T *eap)); 301 static void ex_join __ARGS((exarg_T *eap));
298 static void ex_at __ARGS((exarg_T *eap)); 302 static void ex_at __ARGS((exarg_T *eap));
299 static void ex_bang __ARGS((exarg_T *eap)); 303 static void ex_bang __ARGS((exarg_T *eap));
300 static void ex_undo __ARGS((exarg_T *eap)); 304 static void ex_undo __ARGS((exarg_T *eap));
305 #ifdef FEAT_PERSISTENT_UNDO
306 static void ex_wundo __ARGS((exarg_T *eap));
307 static void ex_rundo __ARGS((exarg_T *eap));
308 #endif
301 static void ex_redo __ARGS((exarg_T *eap)); 309 static void ex_redo __ARGS((exarg_T *eap));
302 static void ex_later __ARGS((exarg_T *eap)); 310 static void ex_later __ARGS((exarg_T *eap));
303 static void ex_redir __ARGS((exarg_T *eap)); 311 static void ex_redir __ARGS((exarg_T *eap));
304 static void ex_redraw __ARGS((exarg_T *eap)); 312 static void ex_redraw __ARGS((exarg_T *eap));
305 static void ex_redrawstatus __ARGS((exarg_T *eap)); 313 static void ex_redrawstatus __ARGS((exarg_T *eap));
8450 undo_time(eap->line2, FALSE, TRUE); 8458 undo_time(eap->line2, FALSE, TRUE);
8451 else 8459 else
8452 u_undo(1); 8460 u_undo(1);
8453 } 8461 }
8454 8462
8463 #ifdef FEAT_PERSISTENT_UNDO
8464 void
8465 ex_wundo(eap)
8466 exarg_T *eap;
8467 {
8468 char_u hash[UNDO_HASH_SIZE];
8469
8470 u_compute_hash(hash);
8471 u_write_undo(eap->arg, eap->forceit, curbuf, hash);
8472 }
8473
8474 void
8475 ex_rundo(eap)
8476 exarg_T *eap;
8477 {
8478 char_u hash[UNDO_HASH_SIZE];
8479
8480 u_compute_hash(hash);
8481 u_read_undo(eap->arg, hash);
8482 }
8483 #endif
8484
8455 /* 8485 /*
8456 * ":redo". 8486 * ":redo".
8457 */ 8487 */
8458 static void 8488 static void
8459 ex_redo(eap) 8489 ex_redo(eap)