comparison src/undo.c @ 10631:cbf17371627c v8.0.0205

patch 8.0.0205: wrong behavior after :undojoin commit https://github.com/vim/vim/commit/5e4e1b12998b1ed99138cad1c5da4d430f798547 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 17 22:09:45 2017 +0100 patch 8.0.0205: wrong behavior after :undojoin Problem: After :undojoin some commands don't work properly, such as :redo. (Matthew Malcomson) Solution: Don't set curbuf->b_u_curhead. (closes #1390)
author Christian Brabandt <cb@256bit.org>
date Tue, 17 Jan 2017 22:15:04 +0100
parents de77fa909414
children f97a72ad8ffa
comparison
equal deleted inserted replaced
10630:a7d9b73e8f3c 10631:cbf17371627c
3134 if (!curbuf->b_u_synced) 3134 if (!curbuf->b_u_synced)
3135 return; /* already unsynced */ 3135 return; /* already unsynced */
3136 if (get_undolevel() < 0) 3136 if (get_undolevel() < 0)
3137 return; /* no entries, nothing to do */ 3137 return; /* no entries, nothing to do */
3138 else 3138 else
3139 { 3139 /* Append next change to the last entry */
3140 /* Go back to the last entry */ 3140 curbuf->b_u_synced = FALSE;
3141 curbuf->b_u_curhead = curbuf->b_u_newhead;
3142 curbuf->b_u_synced = FALSE; /* no entries, nothing to do */
3143 }
3144 } 3141 }
3145 3142
3146 /* 3143 /*
3147 * Called after writing or reloading the file and setting b_changed to FALSE. 3144 * Called after writing or reloading the file and setting b_changed to FALSE.
3148 * Now an undo means that the buffer is modified. 3145 * Now an undo means that the buffer is modified.