1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: When a 0xa0 character is in a sourced file the error message for
12 unrecognized command does not show the problem.
13 Solution: Display 0xa0 as <a0>.
17 *** ../vim-7.3.319/src/ex_docmd.c 2011-07-20 16:36:35.000000000 +0200
18 --- src/ex_docmd.c 2011-09-21 19:02:15.000000000 +0200
22 static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie));
23 static int if_level = 0; /* depth in :if */
25 + static void append_command __ARGS((char_u *cmd));
26 static char_u *find_command __ARGS((exarg_T *eap, int *full));
28 static void ex_abbreviate __ARGS((exarg_T *eap));
32 STRCPY(IObuff, _("E492: Not an editor command"));
35 ! STRCAT(IObuff, ": ");
36 ! STRNCAT(IObuff, *cmdlinep, 40);
43 STRCPY(IObuff, _("E492: Not an editor command"));
45 ! append_command(*cmdlinep);
51 STRCPY(IObuff, errormsg);
54 ! STRCAT(errormsg, ": ");
55 ! STRNCAT(errormsg, *cmdlinep, IOSIZE - STRLEN(IObuff) - 1);
60 STRCPY(IObuff, errormsg);
63 ! append_command(*cmdlinep);
73 + * Append "cmd" to the error message in IObuff.
74 + * Takes care of limiting the length and handling 0xa0, which would be
75 + * invisible otherwise.
84 + STRCAT(IObuff, ": ");
85 + d = IObuff + STRLEN(IObuff);
86 + while (*s != NUL && d - IObuff < IOSIZE - 7)
90 + enc_utf8 ? (s[0] == 0xc2 && s[1] == 0xa0) :
103 + MB_COPY_CHAR(s, d);
109 * Find an Ex command by its name, either built-in or user.
110 * Start of the name can be found at eap->cmd.
111 * Returns pointer to char after the command name.
112 *** ../vim-7.3.319/src/version.c 2011-09-21 18:23:02.000000000 +0200
113 --- src/version.c 2011-09-21 19:04:35.000000000 +0200
117 { /* Add new patch number below this line */
123 hundred-and-one symptoms of being an internet addict:
124 28. You have comandeered your teenager's phone line for the net and even his
125 friends know not to call on his line anymore.
127 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
128 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
129 \\\ an exciting new programming language -- http://www.Zimbu.org ///
130 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///