From b08d65a967eb60892c85818ec733f6d387b8aa37 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Thu, 19 Jan 2017 14:04:25 +0100 Subject: [PATCH] Make buffer readonly again This time we pay more attention to when the buffer will still be written by the plugin itself. Note to self: Never commit after midnight. --- autoload/startify.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 8dcf1f8..80f0aea 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -53,6 +53,7 @@ function! startify#insane_in_the_membrane() abort silent! setlocal \ bufhidden=wipe + \ colorcolumn= \ nobuflisted \ nocursorcolumn \ nocursorline @@ -61,7 +62,6 @@ function! startify#insane_in_the_membrane() abort \ norelativenumber \ nospell \ noswapfile - \ colorcolumn= if empty(&statusline) setlocal statusline=\ startify endif @@ -152,7 +152,7 @@ function! startify#insane_in_the_membrane() abort autocmd startify CursorMoved call s:set_cursor() silent! file Startify - set filetype=startify + set filetype=startify readonly if exists('#User#Startified') if v:version > 703 || v:version == 703 && has('patch442') doautocmd User Startified @@ -765,7 +765,7 @@ function! s:set_mark(type, ...) abort \ 'T': 'tabnew', \ } - setlocal modifiable + setlocal noreadonly modifiable if entry.marked && index[0] == a:type let entry.cmd = 'edit' @@ -779,7 +779,7 @@ function! s:set_mark(type, ...) abort execute 'normal! ci]'. repeat(a:type, len(index)) endif - setlocal nomodifiable nomodified + setlocal readonly nomodifiable nomodified endfunction " Function: s:sort_by_tick {{{1