summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1352
blob: 530459951263230e13d977d69b2247a1290bc8d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1352
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.1352
Problem:    Undofile() reports wrong name. (Francisco Giordano)
Solution:   Clean up the name before changing path separators. (closes #4392,
            closes #4394)
Files:	    src/evalfunc.c, src/testdir/test_undo.vim


*** ../vim-8.1.1351/src/evalfunc.c	2019-05-16 20:29:40.799834279 +0200
--- src/evalfunc.c	2019-05-19 15:25:48.998541324 +0200
***************
*** 15128,15134 ****
  	}
  	else
  	{
! 	    char_u *ffname = FullName_save(fname, FALSE);
  
  	    if (ffname != NULL)
  		rettv->vval.v_string = u_get_undo_file_name(ffname, FALSE);
--- 15128,15134 ----
  	}
  	else
  	{
! 	    char_u *ffname = FullName_save(fname, TRUE);
  
  	    if (ffname != NULL)
  		rettv->vval.v_string = u_get_undo_file_name(ffname, FALSE);
*** ../vim-8.1.1351/src/testdir/test_undo.vim	2018-12-14 15:48:44.259178570 +0100
--- src/testdir/test_undo.vim	2019-05-19 15:24:54.666834346 +0200
***************
*** 440,444 ****
--- 440,449 ----
    " Test undofile() with 'undodir' set to a non-existing directory.
    call assert_equal('', undofile('Xundofoo'))
  
+   if isdirectory('/tmp')
+     set undodir=/tmp
+     call assert_equal('/tmp/%tmp%file', undofile('///tmp/file'))
+   endif
+ 
    set undodir&
  endfunc
*** ../vim-8.1.1351/src/version.c	2019-05-19 15:19:53.824445415 +0200
--- src/version.c	2019-05-19 15:26:56.666177156 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1352,
  /**/

-- 
EXPERIENCE - experience is a wonderful thing. It enables you to 
recognise a mistake when you make it again.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///