File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -98,10 +98,12 @@ export async function assign(
98
98
findFileFormat ( text , fileformats ) ?? fileformat ;
99
99
const preprocessor = options . preprocessor ?? ( ( v : string [ ] ) => v ) ;
100
100
const repl = preprocessor ( splitText ( text , ff ) ) ;
101
- await batch . batch ( denops , async ( denops ) => {
102
- await fn . setbufvar ( denops , bufnr , "&fileformat" , ff ) ;
103
- await fn . setbufvar ( denops , bufnr , "&fileencoding" , enc ) ;
104
- await replace ( denops , bufnr , repl ) ;
101
+ await modifiable ( denops , bufnr , async ( ) => {
102
+ await batch . batch ( denops , async ( denops ) => {
103
+ await fn . setbufvar ( denops , bufnr , "&fileformat" , ff ) ;
104
+ await fn . setbufvar ( denops , bufnr , "&fileencoding" , enc ) ;
105
+ await replace ( denops , bufnr , repl ) ;
106
+ } ) ;
105
107
} ) ;
106
108
}
107
109
You can’t perform that action at this time.
0 commit comments