Jelajahi Sumber

Do not use a named readonly buffer anymore

Using a readonly buffer causes more problems than it solves.
Marco Hinz 7 tahun lalu
induk
melakukan
187e46aea3
2 mengubah file dengan 3 tambahan dan 10 penghapusan
  1. 0 6
      README.md
  2. 3 4
      autoload/startify.vim

+ 0 - 6
README.md

@@ -46,12 +46,6 @@ That's it. A fancy start screen for Vim.
 _(Almost all visible features enabled. Colorscheme:
 [vim-janah](https://github.com/mhinz/vim-janah).)_
 
-## Gotchas
-
-The Vim 7.4.898 from macOS 10.12 (`/usr/bin/vim`) comes with a bug, that opens
-files with `readonly` set. Don't use this Vim from 3 years ago. Use homebrew or
-MacPorts to get a current version.
-
 ## Author and Feedback
 
 If you like my plugins, please star them on Github. It's a great way of getting

+ 3 - 4
autoload/startify.vim

@@ -151,8 +151,7 @@ function! startify#insane_in_the_membrane() abort
   autocmd startify CursorMoved <buffer> call s:set_cursor()
 
   silent! %foldopen!
-  silent! file Startify
-  set filetype=startify readonly
+  set filetype=startify
 
   if exists('##DirChanged')
     autocmd startify DirChanged <buffer> Startify
@@ -849,7 +848,7 @@ function! s:set_mark(type, ...) abort
         \ 'T': 'tabnew',
         \ }
 
-  setlocal noreadonly modifiable
+  setlocal modifiable
 
   if entry.marked && index[0] == a:type
     let entry.cmd = 'edit'
@@ -866,7 +865,7 @@ function! s:set_mark(type, ...) abort
   " Reset cursor to fixed column, which is important for s:set_cursor().
   call cursor(line('.'), s:fixed_column)
 
-  setlocal readonly nomodifiable nomodified
+  setlocal nomodifiable nomodified
 endfunction
 
 " Function: s:sort_by_tick {{{1