-*options.txt* For Vim version 9.2. Last change: 2026 Mar 23
+*options.txt* For Vim version 9.2. Last change: 2026 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
global
Write the contents of the file, if it has been modified, on each
`:next`, `:rewind`, `:last`, `:first`, `:previous`, `:stop`,
- `:suspend`, `:tag`, `:!`, `:make`, CTRL-] and CTRL-^ command; and when
+ `:suspend`, `:tag`, `:!`, `:make`, `:terminal`, CTRL-] and CTRL-^ command; and when
a `:buffer`, CTRL-O, CTRL-I, '{A-Z0-9}, or `{A-Z0-9} command takes one
to another file.
A buffer is not written if it becomes hidden, e.g. when 'bufhidden' is
int opt_shell = FALSE;
char_u *cmd;
char_u *tofree = NULL;
+ int scroll_save = msg_scroll;
+
+ msg_scroll = FALSE; // don't scroll here
+ autowrite_all();
+ msg_scroll = scroll_save;
init_job_options(&opt);
bw
endfunc
+func Test_term_autowrite()
+ set autowrite
+ new termautowritetestfile
+ call setline(1, 'test content')
+ term echo "test"
+ call assert_equal(['test content'], readfile('termautowritetestfile'))
+ call delete('termautowritetestfile')
+ bwipe!
+ set noautowrite
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab