mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
Merge pull request #27767 from zeertzjq/vim-9.1.0154
vim-patch:9.1.{0154,0158}: shm=F not respected when reloading buffer with 'autoread'
This commit is contained in:
commit
dc2379b89b
@ -5474,7 +5474,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
items, for instance "scanning tags"
|
||||
q do not show "recording @a" when recording a macro *shm-q*
|
||||
F don't give the file info when editing a file, like *shm-F*
|
||||
`:silent` was used for the command
|
||||
`:silent` was used for the command; note that this also
|
||||
affects messages from 'autoread' reloading
|
||||
S do not show search count message when searching, e.g. *shm-S*
|
||||
"[1/5]"
|
||||
|
||||
|
3
runtime/lua/vim/_meta/options.lua
generated
3
runtime/lua/vim/_meta/options.lua
generated
@ -5799,7 +5799,8 @@ vim.bo.sw = vim.bo.shiftwidth
|
||||
--- items, for instance "scanning tags"
|
||||
--- q do not show "recording @a" when recording a macro *shm-q*
|
||||
--- F don't give the file info when editing a file, like *shm-F*
|
||||
--- `:silent` was used for the command
|
||||
--- `:silent` was used for the command; note that this also
|
||||
--- affects messages from 'autoread' reloading
|
||||
--- S do not show search count message when searching, e.g. *shm-S*
|
||||
--- "[1/5]"
|
||||
---
|
||||
|
@ -3153,7 +3153,7 @@ void buf_reload(buf_T *buf, int orig_mode, bool reload_options)
|
||||
curbuf->b_flags |= BF_CHECK_RO; // check for RO again
|
||||
keep_filetype = true; // don't detect 'filetype'
|
||||
if (readfile(buf->b_ffname, buf->b_fname, 0, 0,
|
||||
(linenr_T)MAXLNUM, &ea, flags, false) != OK) {
|
||||
(linenr_T)MAXLNUM, &ea, flags, shortmess(SHM_FILEINFO)) != OK) {
|
||||
if (!aborting()) {
|
||||
semsg(_("E321: Could not reload \"%s\""), buf->b_fname);
|
||||
}
|
||||
|
@ -7331,7 +7331,8 @@ return {
|
||||
items, for instance "scanning tags"
|
||||
q do not show "recording @a" when recording a macro *shm-q*
|
||||
F don't give the file info when editing a file, like *shm-F*
|
||||
`:silent` was used for the command
|
||||
`:silent` was used for the command; note that this also
|
||||
affects messages from 'autoread' reloading
|
||||
S do not show search count message when searching, e.g. *shm-S*
|
||||
"[1/5]"
|
||||
|
||||
|
@ -86,7 +86,7 @@ describe('autoread TUI FocusGained/FocusLost', function()
|
||||
line 3 |
|
||||
line 4 |
|
||||
{5:xtest-foo }|
|
||||
"xtest-foo" 4L, 28B |
|
||||
:edit xtest-foo |
|
||||
{3:-- TERMINAL --} |
|
||||
]],
|
||||
}
|
||||
|
@ -1283,6 +1283,44 @@ func Test_shortmess_F2()
|
||||
" call assert_fails('call test_getvalue("abc")', 'E475:')
|
||||
endfunc
|
||||
|
||||
func Test_shortmess_F3()
|
||||
call writefile(['foo'], 'X_dummy', 'D')
|
||||
|
||||
set hidden
|
||||
set autoread
|
||||
e X_dummy
|
||||
e Xotherfile
|
||||
call assert_equal(['foo'], getbufline('X_dummy', 1, '$'))
|
||||
set shortmess+=F
|
||||
echo ''
|
||||
|
||||
if has('nanotime')
|
||||
sleep 10m
|
||||
else
|
||||
sleep 2
|
||||
endif
|
||||
call writefile(['bar'], 'X_dummy')
|
||||
bprev
|
||||
call assert_equal('', Screenline(&lines))
|
||||
call assert_equal(['bar'], getbufline('X_dummy', 1, '$'))
|
||||
|
||||
if has('nanotime')
|
||||
sleep 10m
|
||||
else
|
||||
sleep 2
|
||||
endif
|
||||
call writefile(['baz'], 'X_dummy')
|
||||
checktime
|
||||
call assert_equal('', Screenline(&lines))
|
||||
call assert_equal(['baz'], getbufline('X_dummy', 1, '$'))
|
||||
|
||||
set shortmess&
|
||||
set autoread&
|
||||
set hidden&
|
||||
bwipe X_dummy
|
||||
bwipe Xotherfile
|
||||
endfunc
|
||||
|
||||
func Test_local_scrolloff()
|
||||
set so=5
|
||||
set siso=7
|
||||
|
Loading…
Reference in New Issue
Block a user