diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-02-04 22:17:25 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-04 22:17:25 +0800 |
commit | 9b0363d365f92b1a31bcf0fc32969a4667c11e95 (patch) | |
tree | c1ed6a90c2ed63a155693b8ce8c71d3319e75d4e | |
parent | cb863d4e1f2c14eca46dda053a0d3062a0802196 (diff) | |
download | rneovim-9b0363d365f92b1a31bcf0fc32969a4667c11e95.tar.gz rneovim-9b0363d365f92b1a31bcf0fc32969a4667c11e95.tar.bz2 rneovim-9b0363d365f92b1a31bcf0fc32969a4667c11e95.zip |
vim-patch:8.2.1128: the write message mentions characters, but it's bytes
Problem: The write message mentions characters, but it's actually bytes.
Solution: Change "C" to "B" and "characters" to "bytes".
https://github.com/vim/vim/commit/3f40ce78f5c178d15871bd784ed878c78f0b8a44
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | src/nvim/fileio.c | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_cscope.vim | 4 | ||||
-rw-r--r-- | test/functional/autocmd/focus_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/ui/input_spec.lua | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 2984a68ea2..6e2bc228d0 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5462,7 +5462,7 @@ A jump table for the options with a short description can be found at |Q_op|. flag meaning when present ~ f use "(3 of 5)" instead of "(file 3 of 5)" i use "[noeol]" instead of "[Incomplete last line]" - l use "999L, 888C" instead of "999 lines, 888 characters" + l use "999L, 888B" instead of "999 lines, 888 bytes" m use "[+]" instead of "[Modified]" n use "[New]" instead of "[New File]" r use "[RO]" instead of "[readonly]" diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index f6d37adf89..f28ee1bfcb 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -3863,7 +3863,7 @@ void msg_add_lines(int insert_space, long lnum, off_T nchars) *p++ = ' '; } if (shortmess(SHM_LINES)) { - vim_snprintf((char *)p, IOSIZE - (p - IObuff), "%" PRId64 "L, %" PRId64 "C", + vim_snprintf((char *)p, IOSIZE - (p - IObuff), "%" PRId64 "L, %" PRId64 "B", (int64_t)lnum, (int64_t)nchars); } else { vim_snprintf((char *)p, IOSIZE - (p - IObuff), @@ -3871,7 +3871,7 @@ void msg_add_lines(int insert_space, long lnum, off_T nchars) (int64_t)lnum); p += STRLEN(p); vim_snprintf((char *)p, IOSIZE - (p - IObuff), - NGETTEXT("%" PRId64 " character", "%" PRId64 " characters", nchars), + NGETTEXT("%" PRId64 " byte", "%" PRId64 " bytes", nchars), (int64_t)nchars); } } diff --git a/src/nvim/testdir/test_cscope.vim b/src/nvim/testdir/test_cscope.vim index cc6154af69..faf37485cd 100644 --- a/src/nvim/testdir/test_cscope.vim +++ b/src/nvim/testdir/test_cscope.vim @@ -102,7 +102,7 @@ func Test_cscopeWithCscopeConnections() for cmd in ['cs find f Xmemfile_test.c', 'cs find 7 Xmemfile_test.c'] enew let a = execute(cmd) - call assert_true(a =~ '"Xmemfile_test.c" \d\+L, \d\+C') + call assert_true(a =~ '"Xmemfile_test.c" \d\+L, \d\+B') call assert_equal('Xmemfile_test.c', @%) endfor @@ -112,7 +112,7 @@ func Test_cscopeWithCscopeConnections() let a = execute(cmd) let alines = split(a, '\n', 1) call assert_equal('', alines[0]) - call assert_true(alines[1] =~ '"Xmemfile_test.c" \d\+L, \d\+C') + call assert_true(alines[1] =~ '"Xmemfile_test.c" \d\+L, \d\+B') call assert_equal('(1 of 1): <<global>> #include <assert.h>', alines[2]) call assert_equal('#include <assert.h>', getline('.')) endfor diff --git a/test/functional/autocmd/focus_spec.lua b/test/functional/autocmd/focus_spec.lua index 3f9a0ad09b..e3c9e1f9ee 100644 --- a/test/functional/autocmd/focus_spec.lua +++ b/test/functional/autocmd/focus_spec.lua @@ -56,7 +56,7 @@ describe('autoread TUI FocusGained/FocusLost', function() line 3 | line 4 | {5:xtest-foo }| - "xtest-foo" 4L, 28C | + "xtest-foo" 4L, 28B | {3:-- TERMINAL --} | ]]} end) diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua index 11718a6e18..78f4c6ddd3 100644 --- a/test/functional/ui/input_spec.lua +++ b/test/functional/ui/input_spec.lua @@ -165,7 +165,7 @@ describe('input non-printable chars', function() {1:~ }| {1:~ }| {1:~ }| - "Xtest-overwrite" [noeol] 1L, 6C | + "Xtest-overwrite" [noeol] 1L, 6B | ]]) -- The timestamp is in second resolution, wait two seconds to be sure. |