diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2021-03-10 17:22:05 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2021-03-10 17:22:05 +0100 |
commit | eda351ca897ca0270ed8b01798af3679914683a1 (patch) | |
tree | 5340822acd25ecd12063f08b1e6d0bed4a891a82 /autoload/zig/fmt.vim | |
parent | cc63193ce82c1e7b9ee2ad7d0ddd14e8394211ef (diff) | |
download | vim-polyglot-eda351ca897ca0270ed8b01798af3679914683a1.tar.gz vim-polyglot-eda351ca897ca0270ed8b01798af3679914683a1.zip |
Update
Diffstat (limited to 'autoload/zig/fmt.vim')
-rw-r--r-- | autoload/zig/fmt.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/autoload/zig/fmt.vim b/autoload/zig/fmt.vim index 7b31febd..3474f34a 100644 --- a/autoload/zig/fmt.vim +++ b/autoload/zig/fmt.vim @@ -31,7 +31,11 @@ function! zig#fmt#Format() abort try | silent undojoin | catch | endtry " Replace the file content with the formatted version. - call deletebufline(current_buf, len(out), line('$')) + if exists('*deletebufline') + call deletebufline(current_buf, len(out), line('$')) + else + silent execute ':' . len(out) . ',' . line('$') . ' delete _' + endif call setline(1, out) " No errors detected, close the loclist. |