comparison src/testdir/test_options.vim @ 34504:a00f7e176c34 v9.1.0158

patch 9.1.0158: 'shortmess' "F" flag doesn't work properly with 'autoread' Commit: https://github.com/vim/vim/commit/8a01744c563f615ae7f6b3ab7f5208214a45a8e2 Author: zeertzjq <zeertzjq@outlook.com> Date: Thu Mar 7 21:48:33 2024 +0100 patch 9.1.0158: 'shortmess' "F" flag doesn't work properly with 'autoread' Problem: 'shortmess' "F" flag doesn't work properly with 'autoread' (after 9.1.0154) Solution: Hide the file info message instead of the warning dialog (zeertzjq) closes: #14159 closes: #14158 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 07 Mar 2024 22:00:03 +0100
parents d43c2e4b645c
children
comparison
equal deleted inserted replaced
34503:1c25b14ad417 34504:a00f7e176c34
1292 bwipe 1292 bwipe
1293 call assert_fails('call test_getvalue("abc")', 'E475:') 1293 call assert_fails('call test_getvalue("abc")', 'E475:')
1294 endfunc 1294 endfunc
1295 1295
1296 func Test_shortmess_F3() 1296 func Test_shortmess_F3()
1297 defer delete('X_dummy') 1297 call writefile(['foo'], 'X_dummy', 'D')
1298 1298
1299 set hidden 1299 set hidden
1300 set autoread 1300 set autoread
1301 e X_dummy 1301 e X_dummy
1302 e file 1302 e Xotherfile
1303 1303 call assert_equal(['foo'], getbufline('X_dummy', 1, '$'))
1304 set shortmess+=F 1304 set shortmess+=F
1305 call writefile(["foo"], 'X_dummy') 1305 echo ''
1306 call assert_true(empty(execute('bn', ''))) 1306
1307 call assert_true(empty(execute('bn', ''))) 1307 if has('nanotime')
1308 sleep 10m
1309 else
1310 sleep 2
1311 endif
1312 call writefile(['bar'], 'X_dummy')
1313 bprev
1314 call assert_equal('', Screenline(&lines))
1315 call assert_equal(['bar'], getbufline('X_dummy', 1, '$'))
1316
1317 if has('nanotime')
1318 sleep 10m
1319 else
1320 sleep 2
1321 endif
1322 call writefile(['baz'], 'X_dummy')
1323 checktime
1324 call assert_equal('', Screenline(&lines))
1325 call assert_equal(['baz'], getbufline('X_dummy', 1, '$'))
1308 1326
1309 set shortmess& 1327 set shortmess&
1310 set autoread& 1328 set autoread&
1311 set hidden& 1329 set hidden&
1312 bwipe 1330 bwipe X_dummy
1313 bwipe 1331 bwipe Xotherfile
1314 endfunc 1332 endfunc
1315 1333
1316 func Test_local_scrolloff() 1334 func Test_local_scrolloff()
1317 set so=5 1335 set so=5
1318 set siso=7 1336 set siso=7