Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
20781:93e66f657101 | 20782:c4bce986c31a |
---|---|
67 #ifndef EBCDIC | 67 #ifndef EBCDIC |
68 || c > '~' | 68 || c > '~' |
69 #endif | 69 #endif |
70 )) | 70 )) |
71 { | 71 { |
72 transchar_nonprint(buf3, c); | 72 transchar_nonprint(curbuf, buf3, c); |
73 vim_snprintf(buf1, sizeof(buf1), " <%s>", (char *)buf3); | 73 vim_snprintf(buf1, sizeof(buf1), " <%s>", (char *)buf3); |
74 } | 74 } |
75 else | 75 else |
76 buf1[0] = NUL; | 76 buf1[0] = NUL; |
77 #ifndef EBCDIC | 77 #ifndef EBCDIC |
2554 other_file = otherfile(ffname); | 2554 other_file = otherfile(ffname); |
2555 } | 2555 } |
2556 } | 2556 } |
2557 | 2557 |
2558 /* | 2558 /* |
2559 * if the file was changed we may not be allowed to abandon it | 2559 * If the file was changed we may not be allowed to abandon it: |
2560 * - if we are going to re-edit the same file | 2560 * - if we are going to re-edit the same file |
2561 * - or if we are the only window on this file and if ECMD_HIDE is FALSE | 2561 * - or if we are the only window on this file and if ECMD_HIDE is FALSE |
2562 */ | 2562 */ |
2563 if ( ((!other_file && !(flags & ECMD_OLDBUF)) | 2563 if ( ((!other_file && !(flags & ECMD_OLDBUF)) |
2564 || (curbuf->b_nwindows == 1 | 2564 || (curbuf->b_nwindows == 1 |