diff src/ex_cmds.c @ 20782:c4bce986c31a v8.2.0943

patch 8.2.0943: displaying ^M or ^J depends on current buffer Commit: https://github.com/vim/vim/commit/32ee627750e8b7b3fa6516b893e72f6e6af54710 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 10 14:16:49 2020 +0200 patch 8.2.0943: displaying ^M or ^J depends on current buffer Problem: Displaying ^M or ^J depends on current buffer. Solution: Pass the displayed buffer to transchar(). (closes https://github.com/vim/vim/issues/6225)
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Jun 2020 14:30:04 +0200
parents d571231175b4
children 9064044fd4f6
line wrap: on
line diff
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -69,7 +69,7 @@ do_ascii(exarg_T *eap UNUSED)
 #endif
 			       ))
 	{
-	    transchar_nonprint(buf3, c);
+	    transchar_nonprint(curbuf, buf3, c);
 	    vim_snprintf(buf1, sizeof(buf1), "  <%s>", (char *)buf3);
 	}
 	else
@@ -2556,7 +2556,7 @@ do_ecmd(
     }
 
     /*
-     * if the file was changed we may not be allowed to abandon it
+     * If the file was changed we may not be allowed to abandon it:
      * - if we are going to re-edit the same file
      * - or if we are the only window on this file and if ECMD_HIDE is FALSE
      */