]> git.ipfire.org Git - ipfire-3.x.git/blob - vim/patches/vim-7.3.512.patch0
838ae3e2f915bd2e73163deef50a069ef9bbd424
[ipfire-3.x.git] / vim / patches / vim-7.3.512.patch0
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.512
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.512
11 Problem: undofile() returns a useless name when passed an empty string.
12 Solution: Return an empty string. (Christian Brabandt)
13 Files: src/eval.c
14
15
16 *** ../vim-7.3.511/src/eval.c 2012-04-25 18:24:24.000000000 +0200
17 --- src/eval.c 2012-04-30 17:23:26.000000000 +0200
18 ***************
19 *** 18259,18269 ****
20 rettv->v_type = VAR_STRING;
21 #ifdef FEAT_PERSISTENT_UNDO
22 {
23 ! char_u *ffname = FullName_save(get_tv_string(&argvars[0]), FALSE);
24
25 ! if (ffname != NULL)
26 ! rettv->vval.v_string = u_get_undo_file_name(ffname, FALSE);
27 ! vim_free(ffname);
28 }
29 #else
30 rettv->vval.v_string = NULL;
31 --- 18259,18279 ----
32 rettv->v_type = VAR_STRING;
33 #ifdef FEAT_PERSISTENT_UNDO
34 {
35 ! char_u *fname = get_tv_string(&argvars[0]);
36
37 ! if (*fname == NUL)
38 ! {
39 ! /* If there is no file name there will be no undo file. */
40 ! rettv->vval.v_string = NULL;
41 ! }
42 ! else
43 ! {
44 ! char_u *ffname = FullName_save(fname, FALSE);
45 !
46 ! if (ffname != NULL)
47 ! rettv->vval.v_string = u_get_undo_file_name(ffname, FALSE);
48 ! vim_free(ffname);
49 ! }
50 }
51 #else
52 rettv->vval.v_string = NULL;
53 *** ../vim-7.3.511/src/version.c 2012-04-30 17:04:47.000000000 +0200
54 --- src/version.c 2012-04-30 17:24:42.000000000 +0200
55 ***************
56 *** 716,717 ****
57 --- 716,719 ----
58 { /* Add new patch number below this line */
59 + /**/
60 + 512,
61 /**/
62
63 --
64 It is illegal for a driver to be blindfolded while operating a vehicle.
65 [real standing law in Alabama, United States of America]
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 ///