comparison src/undo.c @ 1534:bdfbf8ef447a v7.1.249

updated for version 7.1-249
author vimboss
date Wed, 13 Feb 2008 14:21:38 +0000
parents 93ffa40b5320
children 7c8c7c95a865
comparison
equal deleted inserted replaced
1533:8abc0abf8cbd 1534:bdfbf8ef447a
1812 char_u *oldp; 1812 char_u *oldp;
1813 1813
1814 if (undo_off) 1814 if (undo_off)
1815 return; 1815 return;
1816 1816
1817 if (curbuf->b_u_line_ptr == NULL || 1817 if (curbuf->b_u_line_ptr == NULL
1818 curbuf->b_u_line_lnum > curbuf->b_ml.ml_line_count) 1818 || curbuf->b_u_line_lnum > curbuf->b_ml.ml_line_count)
1819 { 1819 {
1820 beep_flush(); 1820 beep_flush();
1821 return; 1821 return;
1822 } 1822 }
1823 /* first save the line for the 'u' command */ 1823
1824 /* first save the line for the 'u' command */
1824 if (u_savecommon(curbuf->b_u_line_lnum - 1, 1825 if (u_savecommon(curbuf->b_u_line_lnum - 1,
1825 curbuf->b_u_line_lnum + 1, (linenr_T)0) == FAIL) 1826 curbuf->b_u_line_lnum + 1, (linenr_T)0) == FAIL)
1826 return; 1827 return;
1827 oldp = u_save_line(curbuf->b_u_line_lnum); 1828 oldp = u_save_line(curbuf->b_u_line_lnum);
1828 if (oldp == NULL) 1829 if (oldp == NULL)
1838 t = curbuf->b_u_line_colnr; 1839 t = curbuf->b_u_line_colnr;
1839 if (curwin->w_cursor.lnum == curbuf->b_u_line_lnum) 1840 if (curwin->w_cursor.lnum == curbuf->b_u_line_lnum)
1840 curbuf->b_u_line_colnr = curwin->w_cursor.col; 1841 curbuf->b_u_line_colnr = curwin->w_cursor.col;
1841 curwin->w_cursor.col = t; 1842 curwin->w_cursor.col = t;
1842 curwin->w_cursor.lnum = curbuf->b_u_line_lnum; 1843 curwin->w_cursor.lnum = curbuf->b_u_line_lnum;
1844 check_cursor_col();
1843 } 1845 }
1844 1846
1845 /* 1847 /*
1846 * There are two implementations of the memory management for undo: 1848 * There are two implementations of the memory management for undo:
1847 * 1. Use the standard malloc()/free() functions. 1849 * 1. Use the standard malloc()/free() functions.