321e7f1
To: vim-dev@vim.org
321e7f1
Subject: Patch 7.2.082
321e7f1
Fcc: outbox
321e7f1
From: Bram Moolenaar <Bram@moolenaar.net>
321e7f1
Mime-Version: 1.0
321e7f1
Content-Type: text/plain; charset=ISO-8859-1
321e7f1
Content-Transfer-Encoding: 8bit
321e7f1
------------
321e7f1
321e7f1
Patch 7.2.082
321e7f1
Problem:    When 'ff' is "mac" then "ga" on a ^J shows 0x0d instead of 0x0a.
321e7f1
	    (Andy Wokula)
321e7f1
Solution:   Use NL for this situation. (Lech Lorens)
321e7f1
Files:	    src/ex_cmds.c
321e7f1
321e7f1
321e7f1
*** ../vim-7.2.081/src/ex_cmds.c	Fri Nov 28 21:26:50 2008
321e7f1
--- src/ex_cmds.c	Tue Jan 13 16:51:32 2009
321e7f1
***************
321e7f1
*** 49,54 ****
321e7f1
--- 49,55 ----
321e7f1
      exarg_T	*eap;
321e7f1
  {
321e7f1
      int		c;
321e7f1
+     int		cval;
321e7f1
      char	buf1[20];
321e7f1
      char	buf2[20];
321e7f1
      char_u	buf3[7];
321e7f1
***************
321e7f1
*** 75,80 ****
321e7f1
--- 76,85 ----
321e7f1
      {
321e7f1
  	if (c == NL)	    /* NUL is stored as NL */
321e7f1
  	    c = NUL;
321e7f1
+ 	if (c == CAR && get_fileformat(curbuf) == EOL_MAC)
321e7f1
+ 	    cval = NL;	    /* NL is stored as CR */
321e7f1
+ 	else
321e7f1
+ 	    cval = c;
321e7f1
  	if (vim_isprintc_strict(c) && (c < ' '
321e7f1
  #ifndef EBCDIC
321e7f1
  		    || c > '~'
321e7f1
***************
321e7f1
*** 94,100 ****
321e7f1
  	    buf2[0] = NUL;
321e7f1
  	vim_snprintf((char *)IObuff, IOSIZE,
321e7f1
  		_("<%s>%s%s  %d,  Hex %02x,  Octal %03o"),
321e7f1
! 					   transchar(c), buf1, buf2, c, c, c);
321e7f1
  #ifdef FEAT_MBYTE
321e7f1
  	if (enc_utf8)
321e7f1
  	    c = cc[ci++];
321e7f1
--- 99,105 ----
321e7f1
  	    buf2[0] = NUL;
321e7f1
  	vim_snprintf((char *)IObuff, IOSIZE,
321e7f1
  		_("<%s>%s%s  %d,  Hex %02x,  Octal %03o"),
321e7f1
! 				  transchar(c), buf1, buf2, cval, cval, cval);
321e7f1
  #ifdef FEAT_MBYTE
321e7f1
  	if (enc_utf8)
321e7f1
  	    c = cc[ci++];
321e7f1
*** ../vim-7.2.081/src/version.c	Tue Jan 13 16:37:31 2009
321e7f1
--- src/version.c	Tue Jan 13 16:53:39 2009
321e7f1
***************
321e7f1
*** 678,679 ****
321e7f1
--- 678,681 ----
321e7f1
  {   /* Add new patch number below this line */
321e7f1
+ /**/
321e7f1
+     82,
321e7f1
  /**/
321e7f1
321e7f1
-- 
321e7f1
The budget process was invented by an alien race of sadistic beings who
321e7f1
resemble large cats.
321e7f1
				(Scott Adams - The Dilbert principle)
321e7f1
321e7f1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
321e7f1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
321e7f1
\\\        download, build and distribute -- http://www.A-A-P.org        ///
321e7f1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///