]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.452
- add patches 7.3.619-743
[packages/vim.git] / 7.3.452
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.452
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.452
11 Problem:    Undo broken when pasting close to the last line. (Andrey Radev)
12 Solution:   Use a flag to remember if the deleted included the last line.
13             (Christian Brabandt)
14 Files:      src/ops.c
15
16
17 *** ../vim-7.3.451/src/ops.c    2012-01-10 13:46:18.000000000 +0100
18 --- src/ops.c   2012-02-22 17:32:40.000000000 +0100
19 ***************
20 *** 1943,1954 ****
21 --- 1943,1956 ----
22         else                            /* delete characters between lines */
23         {
24             pos_T   curpos;
25 +           int     delete_last_line;
26   
27             /* save deleted and changed lines for undo */
28             if (u_save((linenr_T)(curwin->w_cursor.lnum - 1),
29                  (linenr_T)(curwin->w_cursor.lnum + oap->line_count)) == FAIL)
30                 return FAIL;
31   
32 +           delete_last_line = (oap->end.lnum == curbuf->b_ml.ml_line_count);
33             truncate_line(TRUE);        /* delete from cursor to end of line */
34   
35             curpos = curwin->w_cursor;  /* remember curwin->w_cursor */
36 ***************
37 *** 1956,1962 ****
38             del_lines((long)(oap->line_count - 2), FALSE);
39   
40             n = (oap->end.col + 1 - !oap->inclusive);
41 !           if (oap->inclusive && oap->end.lnum == curbuf->b_ml.ml_line_count
42                     && n > (int)STRLEN(ml_get(oap->end.lnum)))
43             {
44                 /* Special case: gH<Del> deletes the last line. */
45 --- 1958,1964 ----
46             del_lines((long)(oap->line_count - 2), FALSE);
47   
48             n = (oap->end.col + 1 - !oap->inclusive);
49 !           if (oap->inclusive && delete_last_line
50                     && n > (int)STRLEN(ml_get(oap->end.lnum)))
51             {
52                 /* Special case: gH<Del> deletes the last line. */
53 *** ../vim-7.3.451/src/version.c        2012-02-22 16:01:53.000000000 +0100
54 --- src/version.c       2012-02-22 17:37:18.000000000 +0100
55 ***************
56 *** 716,717 ****
57 --- 716,719 ----
58   {   /* Add new patch number below this line */
59 + /**/
60 +     452,
61   /**/
62
63 -- 
64 From "know your smileys":
65  =):-)  Uncle Sam
66
67  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
68 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
69 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
70  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.182086 seconds and 3 git commands to generate.