Skip to content

Commit d53931a

Browse files
committed
patch 8.1.0948: when built without +eval "Vim --clean" produces errors
Problem: When built without +eval "Vim --clean" produces errors. (James McCoy) Solution: Do not enable filetype detection.
1 parent 7dca2eb commit d53931a

2 files changed

Lines changed: 30 additions & 23 deletions

File tree

runtime/defaults.vim

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" The default vimrc file.
22
"
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last change: 2019 Jan 26
4+
" Last change: 2019 Feb 18
55
"
66
" This is loaded if no vimrc file was found.
77
" Except when Vim is run with "-u NONE" or "-C".
@@ -90,28 +90,33 @@ if &t_Co > 2 || has("gui_running")
9090
let c_comment_strings=1
9191
endif
9292

93-
" Enable file type detection.
94-
" Use the default filetype settings, so that mail gets 'tw' set to 72,
95-
" 'cindent' is on in C files, etc.
96-
" Also load indent files, to automatically do language-dependent indenting.
97-
" Revert with ":filetype off".
98-
filetype plugin indent on
99-
100-
" Put these in an autocmd group, so that you can revert them with:
101-
" ":augroup vimStartup | au! | augroup END"
102-
augroup vimStartup
103-
au!
104-
105-
" When editing a file, always jump to the last known cursor position.
106-
" Don't do it when the position is invalid, when inside an event handler
107-
" (happens when dropping a file on gvim) and for a commit message (it's
108-
" likely a different one than last time).
109-
autocmd BufReadPost *
110-
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
111-
\ | exe "normal! g`\""
112-
\ | endif
113-
114-
augroup END
93+
" Only do this part when Vim was compiled with the +eval feature.
94+
if 1
95+
96+
" Enable file type detection.
97+
" Use the default filetype settings, so that mail gets 'tw' set to 72,
98+
" 'cindent' is on in C files, etc.
99+
" Also load indent files, to automatically do language-dependent indenting.
100+
" Revert with ":filetype off".
101+
filetype plugin indent on
102+
103+
" Put these in an autocmd group, so that you can revert them with:
104+
" ":augroup vimStartup | au! | augroup END"
105+
augroup vimStartup
106+
au!
107+
108+
" When editing a file, always jump to the last known cursor position.
109+
" Don't do it when the position is invalid, when inside an event handler
110+
" (happens when dropping a file on gvim) and for a commit message (it's
111+
" likely a different one than last time).
112+
autocmd BufReadPost *
113+
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
114+
\ | exe "normal! g`\""
115+
\ | endif
116+
117+
augroup END
118+
119+
endif
115120

116121
" Convenient command to see the difference between the current buffer and the
117122
" file it was loaded from, thus the changes you made.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,8 @@ static char *(features[]) =
779779

780780
static int included_patches[] =
781781
{ /* Add new patch number below this line */
782+
/**/
783+
948,
782784
/**/
783785
947,
784786
/**/

0 commit comments

Comments
 (0)