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