]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blame - vim/patches/vim-7.3.452.patch0
vim: Import latest patches from upstream.
[people/arne_f/ipfire-3.x.git] / vim / patches / vim-7.3.452.patch0
CommitLineData
c6060300
MT
1To: vim_dev@googlegroups.com
2Subject: Patch 7.3.452
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.3.452
11Problem: Undo broken when pasting close to the last line. (Andrey Radev)
12Solution: Use a flag to remember if the deleted included the last line.
13 (Christian Brabandt)
14Files: 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--
64From "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 ///