tomtom / tlib_vim

Some utility functions for VIM
http://www.vim.org/scripts/script.php?script_id=1863
GNU General Public License v3.0
173 stars 43 forks source link

"W10: Warning: Changing a readonly file" when using `view` (vim in readonly mode) #18

Closed blueyed closed 9 years ago

blueyed commented 9 years ago

When using view (which starts vim in readonly mode), calling :TRecentlyUsedFiles triggers this error in tlib:

Error detected while processing function tmru#SelectMRU..tlib#input#ListW..539:
line   33:
W10: Warning: Changing a readonly file

Function #539 is:

function! s:prototype.DisplayList(...) dict "{{{3

The code (source):

call append(0, lines)

The calls to tlib#normal#WithRegister('gg"tdG', 't') and tlib#normal#WithRegister('G"tddgg', 't') fail silently (through try/finally).

It appears that the tlib/tmru should explicitly set noreadonly for its buffer maybe?!

Marezbadei commented 1 year ago

W10: Warning: Changing a readonly file