]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.102
- initial import
[packages/vim.git] / 6.2.102
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.102
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.2.102
11 Problem:    The macros equal() and CR conflict with a Carbon header file.
12 Solution:   Rename equal() to equalpos().  Rename CR to CAR.
13             Do this in the non-extra files only.
14 Files:      src/ascii.h, src/buffer.c, src/charset.c, src/edit.c, src/eval.c,
15             src/ex_cmds.c, src/ex_cmds2.c, src/ex_getln.c, src/fileio.c,
16             src/getchar.c, src/gui.c, src/gui_athena.c,
17             src/gui_gtk_x11.c, src/gui_motif.c, src/macros.h,
18             src/mark.c, src/message.c, src/misc1.c, src/misc2.c,
19             src/normal.c, src/ops.c, src/os_unix.c, src/regexp.c,
20             src/search.c, src/ui.c, src/workshop.c
21
22
23 *** ../vim-6.2.101/src/ascii.h  Sun Oct  6 20:29:01 2002
24 --- src/ascii.h Sun Sep  7 23:16:15 2003
25 ***************
26 *** 28,34 ****
27   #define NL            '\012'
28   #define NL_STR                (char_u *)"\012"
29   #define FF            '\014'
30 ! #define CR            '\015'
31   #define ESC           '\033'
32   #define ESC_STR               (char_u *)"\033"
33   #define ESC_STR_nc    "\033"
34 --- 28,34 ----
35   #define NL            '\012'
36   #define NL_STR                (char_u *)"\012"
37   #define FF            '\014'
38 ! #define CAR           '\015'  /* CR is used by Mac OS X */
39   #define ESC           '\033'
40   #define ESC_STR               (char_u *)"\033"
41   #define ESC_STR_nc    "\033"
42 ***************
43 *** 112,118 ****
44   #define NL            '\x15'
45   #define NL_STR                (char_u *)"\x15"
46   #define FF            '\x0C'
47 ! #define CR            '\x0D'
48   #define ESC           '\x27'
49   #define ESC_STR               (char_u *)"\x27"
50   #define ESC_STR_nc    "\x27"
51 --- 112,118 ----
52   #define NL            '\x15'
53   #define NL_STR                (char_u *)"\x15"
54   #define FF            '\x0C'
55 ! #define CAR           '\x0D'
56   #define ESC           '\x27'
57   #define ESC_STR               (char_u *)"\x27"
58   #define ESC_STR_nc    "\x27"
59 *** ../vim-6.2.101/src/buffer.c Fri Sep 12 20:23:50 2003
60 --- src/buffer.c        Sun Sep  7 23:17:03 2003
61 ***************
62 *** 3423,3429 ****
63             }
64             if (num == NL)
65                 num = 0;
66 !           else if (num == CR && get_fileformat(wp->w_buffer) == EOL_MAC)
67                 num = NL;
68             break;
69   
70 --- 3423,3429 ----
71             }
72             if (num == NL)
73                 num = 0;
74 !           else if (num == CAR && get_fileformat(wp->w_buffer) == EOL_MAC)
75                 num = NL;
76             break;
77   
78 *** ../vim-6.2.101/src/charset.c        Tue Jun  3 22:29:09 2003
79 --- src/charset.c       Sun Sep  7 23:17:11 2003
80 ***************
81 *** 550,556 ****
82   {
83       if (c == NL)
84         c = NUL;                /* we use newline in place of a NUL */
85 !     else if (c == CR && get_fileformat(curbuf) == EOL_MAC)
86         c = NL;                 /* we use CR in place of  NL in this case */
87   
88       if (dy_flags & DY_UHEX)           /* 'display' has "uhex" */
89 --- 550,556 ----
90   {
91       if (c == NL)
92         c = NUL;                /* we use newline in place of a NUL */
93 !     else if (c == CAR && get_fileformat(curbuf) == EOL_MAC)
94         c = NL;                 /* we use CR in place of  NL in this case */
95   
96       if (dy_flags & DY_UHEX)           /* 'display' has "uhex" */
97 *** ../vim-6.2.101/src/edit.c   Tue Sep 16 14:15:52 2003
98 --- src/edit.c  Sat Sep 13 13:43:36 2003
99 ***************
100 *** 1117,1130 ****
101             break;
102   
103         case K_KENTER:
104 !           c = CR;
105             /* FALLTHROUGH */
106 !       case CR:
107         case NL:
108   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
109             /* In a quickfix window a <CR> jumps to the error under the
110              * cursor. */
111 !           if (bt_quickfix(curbuf) && c == CR)
112             {
113                 do_cmdline_cmd((char_u *)".cc");
114                 break;
115 --- 1117,1130 ----
116             break;
117   
118         case K_KENTER:
119 !           c = CAR;
120             /* FALLTHROUGH */
121 !       case CAR:
122         case NL:
123   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
124             /* In a quickfix window a <CR> jumps to the error under the
125              * cursor. */
126 !           if (bt_quickfix(curbuf) && c == CAR)
127             {
128                 do_cmdline_cmd((char_u *)".cc");
129                 break;
130 ***************
131 *** 1134,1140 ****
132             if (cmdwin_type != 0)
133             {
134                 /* Execute the command in the cmdline window. */
135 !               cmdwin_result = CR;
136                 goto doESCkey;
137             }
138   #endif
139 --- 1134,1140 ----
140             if (cmdwin_type != 0)
141             {
142                 /* Execute the command in the cmdline window. */
143 !               cmdwin_result = CAR;
144                 goto doESCkey;
145             }
146   #endif
147 ***************
148 *** 6680,6686 ****
149       curbuf = curwin->w_buffer;
150   # endif
151   
152 !     if (!equal(curwin->w_cursor, tpos))
153       {
154         start_arrow(&tpos);
155   # ifdef FEAT_CINDENT
156 --- 6680,6686 ----
157       curbuf = curwin->w_buffer;
158   # endif
159   
160 !     if (!equalpos(curwin->w_cursor, tpos))
161       {
162         start_arrow(&tpos);
163   # ifdef FEAT_CINDENT
164 *** ../vim-6.2.101/src/eval.c   Wed Sep 10 21:40:26 2003
165 --- src/eval.c  Wed Sep 17 21:53:22 2003
166 ***************
167 *** 2516,2522 ****
168                 case 'e': name[i++] = ESC; break;
169                 case 'f': name[i++] = FF; break;
170                 case 'n': name[i++] = NL; break;
171 !               case 'r': name[i++] = CR; break;
172                 case 't': name[i++] = TAB; break;
173   
174                 case 'X': /* hex: "\x1", "\x12" */
175 --- 2516,2522 ----
176                 case 'e': name[i++] = ESC; break;
177                 case 'f': name[i++] = FF; break;
178                 case 'n': name[i++] = NL; break;
179 !               case 'r': name[i++] = CAR; break;
180                 case 't': name[i++] = TAB; break;
181   
182                 case 'X': /* hex: "\x1", "\x12" */
183 ***************
184 *** 6124,6130 ****
185       {
186         n = searchit(curwin, curbuf, &pos, dir, pat, 1L,
187                                                       SEARCH_KEEP, RE_SEARCH);
188 !       if (n == FAIL || (firstpos.lnum != 0 && equal(pos, firstpos)))
189             /* didn't find it or found the first match again: FAIL */
190             break;
191   
192 --- 6124,6130 ----
193       {
194         n = searchit(curwin, curbuf, &pos, dir, pat, 1L,
195                                                       SEARCH_KEEP, RE_SEARCH);
196 !       if (n == FAIL || (firstpos.lnum != 0 && equalpos(pos, firstpos)))
197             /* didn't find it or found the first match again: FAIL */
198             break;
199   
200 ***************
201 *** 7072,7078 ****
202   
203         for (s = p; *s; ++s)
204         {
205 !           if (*s == CR)
206                 *s = NL;
207         }
208       }
209 --- 7072,7078 ----
210   
211         for (s = p; *s; ++s)
212         {
213 !           if (*s == CAR)
214                 *s = NL;
215         }
216       }
217 ***************
218 *** 7086,7092 ****
219         d = p;
220         for (s = p; *s; ++s)
221         {
222 !           if (s[0] == CR && s[1] == NL)
223                 ++s;
224             *d++ = *s;
225         }
226 --- 7086,7092 ----
227         d = p;
228         for (s = p; *s; ++s)
229         {
230 !           if (s[0] == CAR && s[1] == NL)
231                 ++s;
232             *d++ = *s;
233         }
234 *** ../vim-6.2.101/src/ex_cmds.c        Fri Sep 12 20:07:18 2003
235 --- src/ex_cmds.c       Tue Sep  9 22:03:12 2003
236 ***************
237 *** 4000,4006 ****
238                 {
239                     if (p1[0] == '\\' && p1[1] != NUL)  /* remove backslash */
240                         mch_memmove(p1, p1 + 1, STRLEN(p1));
241 !                   else if (*p1 == CR)
242                     {
243                         if (u_inssub(lnum) == OK)   /* prepare for undo */
244                         {
245 --- 4000,4006 ----
246                 {
247                     if (p1[0] == '\\' && p1[1] != NUL)  /* remove backslash */
248                         mch_memmove(p1, p1 + 1, STRLEN(p1));
249 !                   else if (*p1 == CAR)
250                     {
251                         if (u_inssub(lnum) == OK)   /* prepare for undo */
252                         {
253 *** ../vim-6.2.101/src/ex_cmds2.c       Thu Sep 11 21:25:44 2003
254 --- src/ex_cmds2.c      Sun Sep  7 23:19:35 2003
255 ***************
256 *** 5193,5199 ****
257             case TAB:  ga_append(&prt_ps_buffer, IF_EB('t', 0164)); break;
258             case NL:   ga_append(&prt_ps_buffer, IF_EB('n', 0156)); break;
259             case FF:   ga_append(&prt_ps_buffer, IF_EB('f', 0146)); break;
260 !           case CR:   ga_append(&prt_ps_buffer, IF_EB('r', 0162)); break;
261             case '(':  ga_append(&prt_ps_buffer, IF_EB('(', 0050)); break;
262             case ')':  ga_append(&prt_ps_buffer, IF_EB(')', 0051)); break;
263             case '\\': ga_append(&prt_ps_buffer, IF_EB('\\', 0134)); break;
264 --- 5193,5199 ----
265             case TAB:  ga_append(&prt_ps_buffer, IF_EB('t', 0164)); break;
266             case NL:   ga_append(&prt_ps_buffer, IF_EB('n', 0156)); break;
267             case FF:   ga_append(&prt_ps_buffer, IF_EB('f', 0146)); break;
268 !           case CAR:  ga_append(&prt_ps_buffer, IF_EB('r', 0162)); break;
269             case '(':  ga_append(&prt_ps_buffer, IF_EB('(', 0050)); break;
270             case ')':  ga_append(&prt_ps_buffer, IF_EB(')', 0051)); break;
271             case '\\': ga_append(&prt_ps_buffer, IF_EB('\\', 0134)); break;
272 *** ../vim-6.2.101/src/ex_getln.c       Sun Aug 10 22:24:37 2003
273 --- src/ex_getln.c      Sun Sep  7 23:20:11 2003
274 ***************
275 *** 4993,5004 ****
276         if (cmdwin_result == K_XF1)             /* :qa! typed */
277         {
278             ccline.cmdbuff = vim_strsave((char_u *)"qa!");
279 !           cmdwin_result = CR;
280         }
281         else if (cmdwin_result == K_XF2)        /* :qa typed */
282         {
283             ccline.cmdbuff = vim_strsave((char_u *)"qa");
284 !           cmdwin_result = CR;
285         }
286         else
287             ccline.cmdbuff = vim_strsave(ml_get_curline());
288 --- 4995,5006 ----
289         if (cmdwin_result == K_XF1)             /* :qa! typed */
290         {
291             ccline.cmdbuff = vim_strsave((char_u *)"qa!");
292 !           cmdwin_result = CAR;
293         }
294         else if (cmdwin_result == K_XF2)        /* :qa typed */
295         {
296             ccline.cmdbuff = vim_strsave((char_u *)"qa");
297 !           cmdwin_result = CAR;
298         }
299         else
300             ccline.cmdbuff = vim_strsave(ml_get_curline());
301 *** ../vim-6.2.101/src/fileio.c Sun Jul 27 14:19:17 2003
302 --- src/fileio.c        Wed Sep 17 22:01:56 2003
303 ***************
304 *** 1596,1602 ****
305                         if (*p == NL)
306                         {
307                             if (!try_unix
308 !                                   || (try_dos && p > ptr && p[-1] == CR))
309                                 fileformat = EOL_DOS;
310                             else
311                                 fileformat = EOL_UNIX;
312 --- 1592,1598 ----
313                         if (*p == NL)
314                         {
315                             if (!try_unix
316 !                                   || (try_dos && p > ptr && p[-1] == CAR))
317                                 fileformat = EOL_DOS;
318                             else
319                                 fileformat = EOL_UNIX;
320 ***************
321 *** 1610,1616 ****
322                         /* Need to reset the counters when retrying fenc. */
323                         try_mac = 1;
324                         try_unix = 1;
325 !                       for (; p >= ptr && *p != CR; p--)
326                             ;
327                         if (p >= ptr)
328                         {
329 --- 1606,1612 ----
330                         /* Need to reset the counters when retrying fenc. */
331                         try_mac = 1;
332                         try_unix = 1;
333 !                       for (; p >= ptr && *p != CAR; p--)
334                             ;
335                         if (p >= ptr)
336                         {
337 ***************
338 *** 1618,1624 ****
339                             {
340                                 if (*p == NL)
341                                     try_unix++;
342 !                               else if (*p == CR)
343                                     try_mac++;
344                             }
345                             if (try_mac > try_unix)
346 --- 1614,1620 ----
347                             {
348                                 if (*p == NL)
349                                     try_unix++;
350 !                               else if (*p == CAR)
351                                     try_mac++;
352                             }
353                             if (try_mac > try_unix)
354 ***************
355 *** 1651,1662 ****
356             while (++ptr, --size >= 0)
357             {
358                 /* catch most common case first */
359 !               if ((c = *ptr) != NUL && c != CR && c != NL)
360                     continue;
361                 if (c == NUL)
362                     *ptr = NL;  /* NULs are replaced by newlines! */
363                 else if (c == NL)
364 !                   *ptr = CR;  /* NLs are replaced by CRs! */
365                 else
366                 {
367                     if (skip_count == 0)
368 --- 1647,1658 ----
369             while (++ptr, --size >= 0)
370             {
371                 /* catch most common case first */
372 !               if ((c = *ptr) != NUL && c != CAR && c != NL)
373                     continue;
374                 if (c == NUL)
375                     *ptr = NL;  /* NULs are replaced by newlines! */
376                 else if (c == NL)
377 !                   *ptr = CAR; /* NLs are replaced by CRs! */
378                 else
379                 {
380                     if (skip_count == 0)
381 ***************
382 *** 1699,1705 ****
383                         len = (colnr_T)(ptr - line_start + 1);
384                         if (fileformat == EOL_DOS)
385                         {
386 !                           if (ptr[-1] == CR)  /* remove CR */
387                             {
388                                 ptr[-1] = NUL;
389                                 --len;
390 --- 1695,1701 ----
391                         len = (colnr_T)(ptr - line_start + 1);
392                         if (fileformat == EOL_DOS)
393                         {
394 !                           if (ptr[-1] == CAR) /* remove CR */
395                             {
396                                 ptr[-1] = NUL;
397                                 --len;
398 ***************
399 *** 3569,3575 ****
400         {
401             if (c == NL)
402                 *s = NUL;               /* replace newlines with NULs */
403 !           else if (c == CR && fileformat == EOL_MAC)
404                 *s = NL;                /* Mac: replace CRs with NLs */
405             else
406                 *s = c;
407 --- 3565,3571 ----
408         {
409             if (c == NL)
410                 *s = NUL;               /* replace newlines with NULs */
411 !           else if (c == CAR && fileformat == EOL_MAC)
412                 *s = NL;                /* Mac: replace CRs with NLs */
413             else
414                 *s = c;
415 ***************
416 *** 3600,3606 ****
417             *s++ = NL;
418         else
419         {
420 !           *s++ = CR;                  /* EOL_MAC or EOL_DOS: write CR */
421             if (fileformat == EOL_DOS)  /* write CR-NL */
422             {
423                 if (++len == bufsize)
424 --- 3596,3602 ----
425             *s++ = NL;
426         else
427         {
428 !           *s++ = CAR;                 /* EOL_MAC or EOL_DOS: write CR */
429             if (fileformat == EOL_DOS)  /* write CR-NL */
430             {
431                 if (++len == bufsize)
432 *** ../vim-6.2.101/src/getchar.c        Tue May 20 21:33:40 2003
433 --- src/getchar.c       Sun Sep  7 23:21:09 2003
434 ***************
435 *** 1485,1491 ****
436                 case K_KMINUS:          c = '-'; break;
437                 case K_KDIVIDE:         c = '/'; break;
438                 case K_KMULTIPLY:       c = '*'; break;
439 !               case K_KENTER:          c = CR; break;
440                 case K_KPOINT:          c = '.'; break;
441                 case K_K0:              c = '0'; break;
442                 case K_K1:              c = '1'; break;
443 --- 1485,1491 ----
444                 case K_KMINUS:          c = '-'; break;
445                 case K_KDIVIDE:         c = '/'; break;
446                 case K_KMULTIPLY:       c = '*'; break;
447 !               case K_KENTER:          c = CAR; break;
448                 case K_KPOINT:          c = '.'; break;
449                 case K_K0:              c = '0'; break;
450                 case K_K1:              c = '1'; break;
451 ***************
452 *** 1810,1816 ****
453                                     && typebuf.tb_noremap[typebuf.tb_off]
454                                                                   != RM_NONE))
455                             && !(p_paste && (State & (INSERT + CMDLINE)))
456 !                           && !(State == HITRETURN && (c1 == CR || c1 == ' '))
457                             && State != ASKMORE
458                             && State != CONFIRM
459   #ifdef FEAT_INS_EXPAND
460 --- 1810,1816 ----
461                                     && typebuf.tb_noremap[typebuf.tb_off]
462                                                                   != RM_NONE))
463                             && !(p_paste && (State & (INSERT + CMDLINE)))
464 !                           && !(State == HITRETURN && (c1 == CAR || c1 == ' '))
465                             && State != ASKMORE
466                             && State != CONFIRM
467   #ifdef FEAT_INS_EXPAND
468 *** ../vim-6.2.101/src/gui.c    Sat May 17 21:46:27 2003
469 --- src/gui.c   Sun Sep  7 22:45:17 2003
470 ***************
471 *** 3767,3773 ****
472         updateWindow(wp);   /* update window, status line, and cmdline */
473       }
474   
475 !     return (wp == curwin && !equal(curwin->w_cursor, old_cursor));
476   }
477   
478   
479 --- 3767,3773 ----
480         updateWindow(wp);   /* update window, status line, and cmdline */
481       }
482   
483 !     return (wp == curwin && !equalpos(curwin->w_cursor, old_cursor));
484   }
485   
486   
487 *** ../vim-6.2.101/src/gui_athena.c     Sun May 25 19:43:14 2003
488 --- src/gui_athena.c    Sun Sep  7 23:21:28 2003
489 ***************
490 *** 1984,1990 ****
491   
492       if (XLookupString(&(event->xkey), buf, 2, NULL, NULL) == 1)
493       {
494 !       if (*buf == CR)
495             dialogStatus = 1;
496         else if (*buf == ESC)
497             dialogStatus = 0;
498 --- 1984,1990 ----
499   
500       if (XLookupString(&(event->xkey), buf, 2, NULL, NULL) == 1)
501       {
502 !       if (*buf == CAR)
503             dialogStatus = 1;
504         else if (*buf == ESC)
505             dialogStatus = 0;
506 *** ../vim-6.2.101/src/gui_gtk_x11.c    Mon Jun  2 22:16:24 2003
507 --- src/gui_gtk_x11.c   Sun Sep  7 23:21:49 2003
508 ***************
509 *** 864,870 ****
510                 string[0] = NL;
511                 break;
512             case GDK_Return: case GDK_ISO_Enter: case GDK_3270_Enter:
513 !               string[0] = CR;
514                 break;
515             case GDK_Escape:
516                 string[0] = ESC;
517 --- 864,870 ----
518                 string[0] = NL;
519                 break;
520             case GDK_Return: case GDK_ISO_Enter: case GDK_3270_Enter:
521 !               string[0] = CAR;
522                 break;
523             case GDK_Escape:
524                 string[0] = ESC;
525 *** ../vim-6.2.101/src/gui_motif.c      Sat May 24 19:30:02 2003
526 --- src/gui_motif.c     Sun Sep  7 23:22:40 2003
527 ***************
528 *** 1726,1732 ****
529   
530       if (XLookupString(&(event->xkey), buf, 2, &key_sym, NULL) == 1)
531       {
532 !       if (*buf == CR)
533             dialogStatus = 1;
534         else if (*buf == ESC)
535             dialogStatus = 2;
536 --- 1726,1732 ----
537   
538       if (XLookupString(&(event->xkey), buf, 2, &key_sym, NULL) == 1)
539       {
540 !       if (*buf == CAR)
541             dialogStatus = 1;
542         else if (*buf == ESC)
543             dialogStatus = 2;
544 *** ../vim-6.2.101/src/macros.h Sat May  3 15:51:27 2003
545 --- src/macros.h        Sun Sep  7 22:45:38 2003
546 ***************
547 *** 29,44 ****
548                    : (a)->col != (b)->col \
549                        ? (a)->col < (b)->col \
550                        : (a)->coladd < (b)->coladd)
551 ! # define equal(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd))
552   #else
553   # define lt(a, b) (((a).lnum != (b).lnum) \
554                    ? ((a).lnum < (b).lnum) : ((a).col < (b).col))
555   # define ltp(a, b) (((a)->lnum != (b)->lnum) \
556                    ? ((a)->lnum < (b)->lnum) : ((a)->col < (b)->col))
557 ! # define equal(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col))
558   #endif
559   
560 ! #define ltoreq(a, b) (lt(a, b) || equal(a, b))
561   
562   /*
563    * lineempty() - return TRUE if the line is empty
564 --- 29,44 ----
565                    : (a)->col != (b)->col \
566                        ? (a)->col < (b)->col \
567                        : (a)->coladd < (b)->coladd)
568 ! # define equalpos(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd))
569   #else
570   # define lt(a, b) (((a).lnum != (b).lnum) \
571                    ? ((a).lnum < (b).lnum) : ((a).col < (b).col))
572   # define ltp(a, b) (((a)->lnum != (b)->lnum) \
573                    ? ((a)->lnum < (b)->lnum) : ((a)->col < (b)->col))
574 ! # define equalpos(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col))
575   #endif
576   
577 ! #define ltoreq(a, b) (lt(a, b) || equalpos(a, b))
578   
579   /*
580    * lineempty() - return TRUE if the line is empty
581 *** ../vim-6.2.101/src/mark.c   Sun Jul 27 14:22:19 2003
582 --- src/mark.c  Sun Sep  7 22:45:54 2003
583 ***************
584 *** 151,157 ****
585   checkpcmark()
586   {
587       if (curwin->w_prev_pcmark.lnum != 0
588 !           && (equal(curwin->w_pcmark, curwin->w_cursor)
589                 || curwin->w_pcmark.lnum == 0))
590       {
591         curwin->w_pcmark = curwin->w_prev_pcmark;
592 --- 151,157 ----
593   checkpcmark()
594   {
595       if (curwin->w_prev_pcmark.lnum != 0
596 !           && (equalpos(curwin->w_pcmark, curwin->w_cursor)
597                 || curwin->w_pcmark.lnum == 0))
598       {
599         curwin->w_pcmark = curwin->w_prev_pcmark;
600 *** ../vim-6.2.101/src/message.c        Sun Aug 10 22:39:59 2003
601 --- src/message.c       Sun Sep  7 23:25:22 2003
602 ***************
603 *** 786,803 ****
604         return;
605       }
606   
607 !     redir_off = TRUE;             /* don't redirect this message */
608       oldState = State;
609       if (quit_more)
610       {
611 !       c = CR;                     /* just pretend CR was hit */
612         quit_more = FALSE;
613         got_int = FALSE;
614       }
615       else if (exmode_active)
616       {
617 !       MSG_PUTS(" ");    /* make sure the cursor is on the right line */
618 !       c = CR;                     /* no need for a return in ex mode */
619         got_int = FALSE;
620       }
621       else
622 --- 786,803 ----
623         return;
624       }
625   
626 !     redir_off = TRUE;         /* don't redirect this message */
627       oldState = State;
628       if (quit_more)
629       {
630 !       c = CAR;                /* just pretend CR was hit */
631         quit_more = FALSE;
632         got_int = FALSE;
633       }
634       else if (exmode_active)
635       {
636 !       MSG_PUTS(" ");          /* make sure the cursor is on the right line */
637 !       c = CAR;                /* no need for a return in ex mode */
638         got_int = FALSE;
639       }
640       else
641 ***************
642 *** 1858,1864 ****
643                         more_back = 1;
644                         lines_left = 1;
645                         break;
646 !                   case CR:            /* one extra line */
647                     case NL:
648                     case 'j':
649                     case K_DOWN:
650 --- 1858,1864 ----
651                         more_back = 1;
652                         lines_left = 1;
653                         break;
654 !                   case CAR:           /* one extra line */
655                     case NL:
656                     case 'j':
657                     case K_DOWN:
658 ***************
659 *** 2575,2581 ****
660             c = get_keystroke();
661             switch (c)
662             {
663 !           case CR:            /* User accepts default option */
664             case NL:
665                 retval = dfltbutton;
666                 break;
667 --- 2575,2581 ----
668             c = get_keystroke();
669             switch (c)
670             {
671 !           case CAR:           /* User accepts default option */
672             case NL:
673                 retval = dfltbutton;
674                 break;
675 *** ../vim-6.2.101/src/misc1.c  Sun Aug 10 22:24:37 2003
676 --- src/misc1.c Fri Sep 26 22:09:58 2003
677 ***************
678 *** 2884,2890 ****
679             do_redraw = FALSE;
680             break;
681         }
682 !       else if (c == CR || c == NL || c == Ctrl_C || c == ESC)
683             break;
684       }
685       --no_mapping;
686 --- 2884,2890 ----
687             do_redraw = FALSE;
688             break;
689         }
690 !       else if (c == CAR || c == NL || c == Ctrl_C || c == ESC)
691             break;
692       }
693       --no_mapping;
694 *** ../vim-6.2.101/src/misc2.c  Fri Sep 12 20:20:20 2003
695 --- src/misc2.c Sun Sep  7 23:25:58 2003
696 ***************
697 *** 1759,1767 ****
698       {NL,              (char_u *)"NewLine"},   /* Alternative name */
699       {NL,              (char_u *)"LineFeed"},  /* Alternative name */
700       {NL,              (char_u *)"LF"},        /* Alternative name */
701 !     {CR,              (char_u *)"CR"},
702 !     {CR,              (char_u *)"Return"},    /* Alternative name */
703 !     {CR,              (char_u *)"Enter"},     /* Alternative name */
704       {K_BS,            (char_u *)"BS"},
705       {K_BS,            (char_u *)"BackSpace"}, /* Alternative name */
706       {ESC,             (char_u *)"Esc"},
707 --- 1759,1767 ----
708       {NL,              (char_u *)"NewLine"},   /* Alternative name */
709       {NL,              (char_u *)"LineFeed"},  /* Alternative name */
710       {NL,              (char_u *)"LF"},        /* Alternative name */
711 !     {CAR,             (char_u *)"CR"},
712 !     {CAR,             (char_u *)"Return"},    /* Alternative name */
713 !     {CAR,             (char_u *)"Enter"},     /* Alternative name */
714       {K_BS,            (char_u *)"BS"},
715       {K_BS,            (char_u *)"BackSpace"}, /* Alternative name */
716       {ESC,             (char_u *)"Esc"},
717 *** ../vim-6.2.101/src/normal.c Thu Sep 11 21:21:21 2003
718 --- src/normal.c        Sun Sep  7 23:26:22 2003
719 ***************
720 *** 227,233 ****
721       {NL,      nv_down,        0,                      FALSE},
722       {Ctrl_K,  nv_error,       0,                      0},
723       {Ctrl_L,  nv_clear,       0,                      0},
724 !     {CR,      nv_down,        0,                      TRUE},
725       {Ctrl_N,  nv_down,        NV_STS,                 FALSE},
726       {Ctrl_O,  nv_ctrlo,       0,                      0},
727       {Ctrl_P,  nv_up,          NV_STS,                 FALSE},
728 --- 227,233 ----
729       {NL,      nv_down,        0,                      FALSE},
730       {Ctrl_K,  nv_error,       0,                      0},
731       {Ctrl_L,  nv_clear,       0,                      0},
732 !     {CAR,     nv_down,        0,                      TRUE},
733       {Ctrl_N,  nv_down,        NV_STS,                 FALSE},
734       {Ctrl_O,  nv_ctrlo,       0,                      0},
735       {Ctrl_P,  nv_up,          NV_STS,                 FALSE},
736 ***************
737 *** 630,636 ****
738        */
739       if (VIsual_active
740             && VIsual_select
741 !           && (vim_isprintc(c) || c == NL || c == CR || c == K_KENTER))
742       {
743   # ifdef FEAT_MBYTE
744         char_u      buf[MB_MAXBYTES + 1];
745 --- 630,636 ----
746        */
747       if (VIsual_active
748             && VIsual_select
749 !           && (vim_isprintc(c) || c == NL || c == CAR || c == K_KENTER))
750       {
751   # ifdef FEAT_MBYTE
752         char_u      buf[MB_MAXBYTES + 1];
753 ***************
754 *** 1671,1677 ****
755                     && (!oap->inclusive
756                         || (oap->op_type == OP_YANK
757                             && gchar_pos(&oap->end) == NUL))
758 !                   && equal(oap->start, oap->end)
759   #ifdef FEAT_VIRTUALEDIT
760                     && !(virtual_op && oap->start.coladd != oap->end.coladd)
761   #endif
762 --- 1671,1677 ----
763                     && (!oap->inclusive
764                         || (oap->op_type == OP_YANK
765                             && gchar_pos(&oap->end) == NUL))
766 !                   && equalpos(oap->start, oap->end)
767   #ifdef FEAT_VIRTUALEDIT
768                     && !(virtual_op && oap->start.coladd != oap->end.coladd)
769   #endif
770 ***************
771 *** 2743,2749 ****
772                 if (oap != NULL
773                         && VIsual_mode == 'v'
774                         && !vim_iswordc(gchar_pos(&end_visual))
775 !                       && equal(curwin->w_cursor, VIsual)
776                         && (pos = findmatch(oap, NUL)) != NULL)
777                 {
778                     curwin->w_cursor = *pos;
779 --- 2743,2749 ----
780                 if (oap != NULL
781                         && VIsual_mode == 'v'
782                         && !vim_iswordc(gchar_pos(&end_visual))
783 !                       && equalpos(curwin->w_cursor, VIsual)
784                         && (pos = findmatch(oap, NUL)) != NULL)
785                 {
786                     curwin->w_cursor = *pos;
787 ***************
788 *** 4119,4125 ****
789                 n /= 10;
790             else if (vim_isdigit(nchar))
791                 n = n * 10 + (nchar - '0');
792 !           else if (nchar == CR)
793             {
794   #ifdef FEAT_GUI
795                 need_mouse_correct = TRUE;
796 --- 4119,4125 ----
797                 n /= 10;
798             else if (vim_isdigit(nchar))
799                 n = n * 10 + (nchar - '0');
800 !           else if (nchar == CAR)
801             {
802   #ifdef FEAT_GUI
803                 need_mouse_correct = TRUE;
804 ***************
805 *** 4189,4195 ****
806                 }
807                 /* FALLTHROUGH */
808       case NL:
809 !     case CR:
810       case K_KENTER:
811                 beginline(BL_WHITE | BL_FIX);
812                 /* FALLTHROUGH */
813 --- 4189,4195 ----
814                 }
815                 /* FALLTHROUGH */
816       case NL:
817 !     case CAR:
818       case K_KENTER:
819                 beginline(BL_WHITE | BL_FIX);
820                 /* FALLTHROUGH */
821 ***************
822 *** 5234,5240 ****
823   #ifdef FEAT_CMDWIN
824         /* In the cmdline window a <CR> executes the command. */
825         if (cmdwin_type != 0 && cap->cmdchar == '\r')
826 !           cmdwin_result = CR;
827         else
828   #endif
829         {
830 --- 5234,5240 ----
831   #ifdef FEAT_CMDWIN
832         /* In the cmdline window a <CR> executes the command. */
833         if (cmdwin_type != 0 && cap->cmdchar == '\r')
834 !           cmdwin_result = CAR;
835         else
836   #endif
837         {
838 ***************
839 *** 7612,7618 ****
840   {
841       pos_T     *pp;
842   
843 !     if (*p_sel == 'e' && !equal(VIsual, curwin->w_cursor))
844       {
845         if (lt(VIsual, curwin->w_cursor))
846             pp = &curwin->w_cursor;
847 --- 7612,7618 ----
848   {
849       pos_T     *pp;
850   
851 !     if (*p_sel == 'e' && !equalpos(VIsual, curwin->w_cursor))
852       {
853         if (lt(VIsual, curwin->w_cursor))
854             pp = &curwin->w_cursor;
855 *** ../vim-6.2.101/src/ops.c    Fri Sep 12 20:29:23 2003
856 --- src/ops.c   Wed Sep 17 21:59:01 2003
857 ***************
858 *** 1478,1484 ****
859             else
860   #endif
861                 c = *s++;
862 !           if (cv == Ctrl_V || c == ESC || c == Ctrl_C || c == CR || c == NL
863   #ifdef UNIX
864                     || c == intr_char
865   #endif
866 --- 1478,1484 ----
867             else
868   #endif
869                 c = *s++;
870 !           if (cv == Ctrl_V || c == ESC || c == Ctrl_C || c == CAR || c == NL
871   #ifdef UNIX
872                     || c == intr_char
873   #endif
874 *** ../vim-6.2.101/src/os_unix.c        Wed Sep 10 22:51:29 2003
875 --- src/os_unix.c       Sun Sep  7 23:27:25 2003
876 ***************
877 *** 4862,4868 ****
878       /* Translate <CR><NL> into <NL>.  Caution, buffer may contain NUL. */
879       p = buffer;
880       for (i = 0; i < len; ++i)
881 !       if (!(buffer[i] == CR && buffer[i + 1] == NL))
882             *p++ = buffer[i];
883       len = p - buffer;
884   # endif
885 --- 4862,4868 ----
886       /* Translate <CR><NL> into <NL>.  Caution, buffer may contain NUL. */
887       p = buffer;
888       for (i = 0; i < len; ++i)
889 !       if (!(buffer[i] == CAR && buffer[i + 1] == NL))
890             *p++ = buffer[i];
891       len = p - buffer;
892   # endif
893 *** ../vim-6.2.101/src/regexp.c Sun Jul 27 14:49:17 2003
894 --- src/regexp.c        Sun Sep  7 23:28:09 2003
895 ***************
896 *** 393,399 ****
897   {
898       switch (c)
899       {
900 !       case 'r':   return CR;
901         case 't':   return TAB;
902         case 'e':   return ESC;
903         case 'b':   return BS;
904 --- 393,399 ----
905   {
906       switch (c)
907       {
908 !       case 'r':   return CAR;
909         case 't':   return TAB;
910         case 'e':   return ESC;
911         case 'b':   return BS;
912 ***************
913 *** 5711,5717 ****
914                     /* Change NL to CR, so that it becomes a line break.
915                      * Skip over a backslashed character. */
916                     if (*s == NL)
917 !                       *s = CR;
918                     else if (*s == '\\' && s[1] != NUL)
919                         ++s;
920   #ifdef FEAT_MBYTE
921 --- 5711,5717 ----
922                     /* Change NL to CR, so that it becomes a line break.
923                      * Skip over a backslashed character. */
924                     if (*s == NL)
925 !                       *s = CAR;
926                     else if (*s == '\\' && s[1] != NUL)
927                         ++s;
928   #ifdef FEAT_MBYTE
929 ***************
930 *** 5773,5779 ****
931                 /* Check for abbreviations -- webb */
932                 switch (*src)
933                 {
934 !                   case 'r':   c = CR;         ++src;  break;
935                     case 'n':   c = NL;         ++src;  break;
936                     case 't':   c = TAB;        ++src;  break;
937                  /* Oh no!  \e already has meaning in subst pat :-( */
938 --- 5773,5779 ----
939                 /* Check for abbreviations -- webb */
940                 switch (*src)
941                 {
942 !                   case 'r':   c = CAR;        ++src;  break;
943                     case 'n':   c = NL;         ++src;  break;
944                     case 't':   c = TAB;        ++src;  break;
945                  /* Oh no!  \e already has meaning in subst pat :-( */
946 ***************
947 *** 5854,5860 ****
948                             if (reg_mmatch->endpos[no].lnum == clnum)
949                                 break;
950                             if (copy)
951 !                               *dst = CR;
952                             ++dst;
953                             s = reg_getline(++clnum);
954                             if (reg_mmatch->endpos[no].lnum == clnum)
955 --- 5854,5860 ----
956                             if (reg_mmatch->endpos[no].lnum == clnum)
957                                 break;
958                             if (copy)
959 !                               *dst = CAR;
960                             ++dst;
961                             s = reg_getline(++clnum);
962                             if (reg_mmatch->endpos[no].lnum == clnum)
963 ***************
964 *** 5873,5879 ****
965                     }
966                     else
967                     {
968 !                       if (backslash && (*s == CR || *s == '\\'))
969                         {
970                             /*
971                              * Insert a backslash in front of a CR, otherwise
972 --- 5873,5879 ----
973                     }
974                     else
975                     {
976 !                       if (backslash && (*s == CAR || *s == '\\'))
977                         {
978                             /*
979                              * Insert a backslash in front of a CR, otherwise
980 *** ../vim-6.2.101/src/search.c Thu Sep 11 21:42:32 2003
981 --- src/search.c        Sun Sep  7 22:47:43 2003
982 ***************
983 *** 2886,2892 ****
984        * When Visual mode is not active, or when the VIsual area is only one
985        * character, select the word and/or white space under the cursor.
986        */
987 !     if (!VIsual_active || equal(curwin->w_cursor, VIsual))
988   #endif
989       {
990         /*
991 --- 2886,2892 ----
992        * When Visual mode is not active, or when the VIsual area is only one
993        * character, select the word and/or white space under the cursor.
994        */
995 !     if (!VIsual_active || equalpos(curwin->w_cursor, VIsual))
996   #endif
997       {
998         /*
999 ***************
1000 *** 3055,3061 ****
1001       /*
1002        * When visual area is bigger than one character: Extend it.
1003        */
1004 !     if (VIsual_active && !equal(start_pos, VIsual))
1005       {
1006   extend:
1007         if (lt(start_pos, VIsual))
1008 --- 3055,3061 ----
1009       /*
1010        * When visual area is bigger than one character: Extend it.
1011        */
1012 !     if (VIsual_active && !equalpos(start_pos, VIsual))
1013       {
1014   extend:
1015         if (lt(start_pos, VIsual))
1016 ***************
1017 *** 3082,3088 ****
1018             if (!at_start_sent)
1019             {
1020                 findsent(BACKWARD, 1L);
1021 !               if (equal(curwin->w_cursor, start_pos))
1022                     at_start_sent = TRUE;  /* exactly at start of sentence */
1023                 else
1024                     /* inside a sentence, go to its end (start of next) */
1025 --- 3082,3088 ----
1026             if (!at_start_sent)
1027             {
1028                 findsent(BACKWARD, 1L);
1029 !               if (equalpos(curwin->w_cursor, start_pos))
1030                     at_start_sent = TRUE;  /* exactly at start of sentence */
1031                 else
1032                     /* inside a sentence, go to its end (start of next) */
1033 ***************
1034 *** 3111,3117 ****
1035              */
1036             incl(&pos);
1037             at_start_sent = TRUE;
1038 !           if (!equal(pos, curwin->w_cursor))  /* not just before a sentence */
1039             {
1040                 at_start_sent = FALSE;
1041                 while (lt(pos, curwin->w_cursor))
1042 --- 3111,3117 ----
1043              */
1044             incl(&pos);
1045             at_start_sent = TRUE;
1046 !           if (!equalpos(pos, curwin->w_cursor)) /* not just before a sentence */
1047             {
1048                 at_start_sent = FALSE;
1049                 while (lt(pos, curwin->w_cursor))
1050 ***************
1051 *** 3146,3152 ****
1052        */
1053       while (c = gchar_pos(&pos), vim_iswhite(c))       /* vim_iswhite() is a macro */
1054         incl(&pos);
1055 !     if (equal(pos, curwin->w_cursor))
1056       {
1057         start_blank = TRUE;
1058         find_first_blank(&start_pos);   /* go back to first blank */
1059 --- 3146,3152 ----
1060        */
1061       while (c = gchar_pos(&pos), vim_iswhite(c))       /* vim_iswhite() is a macro */
1062         incl(&pos);
1063 !     if (equalpos(pos, curwin->w_cursor))
1064       {
1065         start_blank = TRUE;
1066         find_first_blank(&start_pos);   /* go back to first blank */
1067 ***************
1068 *** 3192,3198 ****
1069       if (VIsual_active)
1070       {
1071         /* avoid getting stuck with "is" on a single space before a sent. */
1072 !       if (equal(start_pos, curwin->w_cursor))
1073             goto extend;
1074         if (*p_sel == 'e')
1075             ++curwin->w_cursor.col;
1076 --- 3192,3198 ----
1077       if (VIsual_active)
1078       {
1079         /* avoid getting stuck with "is" on a single space before a sent. */
1080 !       if (equalpos(start_pos, curwin->w_cursor))
1081             goto extend;
1082         if (*p_sel == 'e')
1083             ++curwin->w_cursor.col;
1084 ***************
1085 *** 3238,3244 ****
1086        * If we start on '(', '{', ')', '}', etc., use the whole block inclusive.
1087        */
1088   #ifdef FEAT_VISUAL
1089 !     if (!VIsual_active || equal(VIsual, curwin->w_cursor))
1090   #endif
1091       {
1092         setpcmark();
1093 --- 3238,3244 ----
1094        * If we start on '(', '{', ')', '}', etc., use the whole block inclusive.
1095        */
1096   #ifdef FEAT_VISUAL
1097 !     if (!VIsual_active || equalpos(VIsual, curwin->w_cursor))
1098   #endif
1099       {
1100         setpcmark();
1101 *** ../vim-6.2.101/src/ui.c     Sat May 17 16:12:34 2003
1102 --- src/ui.c    Sun Sep  7 23:28:45 2003
1103 ***************
1104 *** 149,155 ****
1105   # endif
1106         if (wtime == -1 && ++count == 1000)
1107             read_error_exit();
1108 !       buf[0] = CR;
1109         return 1;
1110       }
1111   #endif
1112 --- 149,155 ----
1113   # endif
1114         if (wtime == -1 && ++count == 1000)
1115             read_error_exit();
1116 !       buf[0] = CAR;
1117         return 1;
1118       }
1119   #endif
1120 ***************
1121 *** 413,420 ****
1122             start = curwin->w_cursor;
1123             end = VIsual;
1124         }
1125 !       if (!equal(clip_star.start, start) || !equal(clip_star.end, end)
1126 !                                           || clip_star.vmode != VIsual_mode)
1127         {
1128             clip_clear_selection();
1129             clip_star.start = start;
1130 --- 413,421 ----
1131             start = curwin->w_cursor;
1132             end = VIsual;
1133         }
1134 !       if (!equalpos(clip_star.start, start)
1135 !               || !equalpos(clip_star.end, end)
1136 !               || clip_star.vmode != VIsual_mode)
1137         {
1138             clip_clear_selection();
1139             clip_star.start = start;
1140 *** ../vim-6.2.101/src/workshop.c       Mon Mar 10 20:04:17 2003
1141 --- src/workshop.c      Sat Sep 13 16:09:50 2003
1142 ***************
1143 *** 1136,1142 ****
1144       *curCol = curwin->w_cursor.col;
1145   
1146       if (curbuf->b_visual_mode == 'v' &&
1147 !           equal(curwin->w_cursor, curbuf->b_visual_end))
1148       {
1149         *selStartLine = curbuf->b_visual_start.lnum;
1150         *selStartCol = curbuf->b_visual_start.col;
1151 --- 1136,1142 ----
1152       *curCol = curwin->w_cursor.col;
1153   
1154       if (curbuf->b_visual_mode == 'v' &&
1155 !           equalpos(curwin->w_cursor, curbuf->b_visual_end))
1156       {
1157         *selStartLine = curbuf->b_visual_start.lnum;
1158         *selStartCol = curbuf->b_visual_start.col;
1159 *** ../vim-6.2.101/src/version.c        Sat Sep 27 19:26:33 2003
1160 --- src/version.c       Sat Sep 27 19:31:42 2003
1161 ***************
1162 *** 632,633 ****
1163 --- 638,641 ----
1164   {   /* Add new patch number below this line */
1165 + /**/
1166 +     102,
1167   /**/
1168
1169 -- 
1170 hundred-and-one symptoms of being an internet addict:
1171 34. You laugh at people with 14400 baud modems.
1172
1173  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
1174 ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
1175 \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
1176  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
This page took 1.909529 seconds and 3 git commands to generate.