]> git.pld-linux.org Git - packages/vim.git/blob - 6.3.021
- typo
[packages/vim.git] / 6.3.021
1 To: vim-dev@vim.org
2 Subject: Patch 6.3.021
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 6.3.021
11 Problem:    When the last character of a file name is a multi-byte character
12             and the last byte is a path separator, the file cannot be edited.
13 Solution:   Check for the last byte to be part of a multi-byte character.
14             (Taro Muraoka)
15 Files:      src/fileio.c
16
17
18 *** ../vim-6.3.020/src/fileio.c Tue Jun 29 20:07:02 2004
19 --- src/fileio.c        Sat Sep  4 15:55:15 2004
20 ***************
21 *** 370,384 ****
22        * file may destroy it!  Reported on MS-DOS and Win 95.
23        * If the name is too long we might crash further on, quit here.
24        */
25 !     if (fname != NULL
26 !           && *fname != NUL
27 !           && (vim_ispathsep(*(fname + STRLEN(fname) - 1))
28 !               || STRLEN(fname) >= MAXPATHL))
29       {
30 !       filemess(curbuf, fname, (char_u *)_("Illegal file name"), 0);
31 !       msg_end();
32 !       msg_scroll = msg_save;
33 !       return FAIL;
34       }
35   
36   #ifdef UNIX
37 --- 370,390 ----
38        * file may destroy it!  Reported on MS-DOS and Win 95.
39        * If the name is too long we might crash further on, quit here.
40        */
41 !     if (fname != NULL && *fname != NUL)
42       {
43 !       p = fname + STRLEN(fname) - 1;
44 !       if ((vim_ispathsep(*p)
45 ! #ifdef FEAT_MBYTE
46 !                   /* Do not use a multi-byte char as path separator. */
47 !                   && (!has_mbyte || (*mb_head_off)(fname, p) == 0)
48 ! #endif
49 !           ) || STRLEN(fname) >= MAXPATHL)
50 !       {
51 !           filemess(curbuf, fname, (char_u *)_("Illegal file name"), 0);
52 !           msg_end();
53 !           msg_scroll = msg_save;
54 !           return FAIL;
55 !       }
56       }
57   
58   #ifdef UNIX
59 *** ../vim-6.3.020/src/version.c        Tue Aug 31 20:06:01 2004
60 --- src/version.c       Sat Sep  4 16:04:00 2004
61 ***************
62 *** 643,644 ****
63 --- 643,646 ----
64   {   /* Add new patch number below this line */
65 + /**/
66 +     21,
67   /**/
68
69 -- 
70    An extraordinary TALL KNIGHT in all black (possibly John with Mike on his
71    shoulders) walks out from the dark trees.  He is extremely fierce and
72    gruesome countenance.  He walks towards KING ARTHUR and PATSY, who are
73    wazzing like mad.  (Salopian slang, meaning very scared.  almost to the
74    point of wetting oneself, e.g. before an important football match or
75    prior to a postering.  Salopian slang meaning a beating by the school
76    praeposters.  Sorry about the Salopian slant to this stage direction - Ed.)
77                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
78
79  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
80 ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
81 \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
82  \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
This page took 0.081098 seconds and 3 git commands to generate.