Mercurial > vim
comparison src/edit.c @ 6629:347747485343 v7.4.640
updated for version 7.4.640
Problem: After deleting characters in Insert mode such that lines are
joined undo does not work properly. (issue 324)
Solution: Use Insstart instead of Insstart_orig. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 17 Feb 2015 17:50:26 +0100 |
parents | 5b8d26b85437 |
children | 41d50eba0c0f |
comparison
equal
deleted
inserted
replaced
6628:a01e15530232 | 6629:347747485343 |
---|---|
8840 /* | 8840 /* |
8841 * delete newline! | 8841 * delete newline! |
8842 */ | 8842 */ |
8843 if (curwin->w_cursor.col == 0) | 8843 if (curwin->w_cursor.col == 0) |
8844 { | 8844 { |
8845 lnum = Insstart_orig.lnum; | 8845 lnum = Insstart.lnum; |
8846 if (curwin->w_cursor.lnum == lnum | 8846 if (curwin->w_cursor.lnum == lnum |
8847 #ifdef FEAT_RIGHTLEFT | 8847 #ifdef FEAT_RIGHTLEFT |
8848 || revins_on | 8848 || revins_on |
8849 #endif | 8849 #endif |
8850 ) | 8850 ) |
8851 { | 8851 { |
8852 if (u_save((linenr_T)(curwin->w_cursor.lnum - 2), | 8852 if (u_save((linenr_T)(curwin->w_cursor.lnum - 2), |
8853 (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL) | 8853 (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL) |
8854 return FALSE; | 8854 return FALSE; |
8855 --Insstart_orig.lnum; | 8855 --Insstart.lnum; |
8856 Insstart_orig.col = MAXCOL; | 8856 Insstart.col = MAXCOL; |
8857 Insstart = Insstart_orig; | |
8858 } | 8857 } |
8859 /* | 8858 /* |
8860 * In replace mode: | 8859 * In replace mode: |
8861 * cc < 0: NL was inserted, delete it | 8860 * cc < 0: NL was inserted, delete it |
8862 * cc >= 0: NL was replaced, put original characters back | 8861 * cc >= 0: NL was replaced, put original characters back |