Browse Source

Merge pull request #170 from sim590/fix-toc-nomodifiable

Prevent setting other buffers to nomodifiable.

Fix #169
digitalocean
Ciro Santilli 10 years ago
parent
commit
fe1eae8a04
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      ftplugin/mkd.vim

+ 3
- 3
ftplugin/mkd.vim View File

@ -318,7 +318,7 @@ function! s:Markdown_Toc(...)
else
lopen
endif
set modifiable
setlocal modifiable
for i in range(1, line('$'))
" this is the location-list data for the current item
let d = getloclist(0)[i-1]
@ -338,8 +338,8 @@ function! s:Markdown_Toc(...)
endif
call setline(i, repeat(' ', l:level). d.text)
endfor
set nomodified
set nomodifiable
setlocal nomodified
setlocal nomodifiable
normal! gg
endfunction


|||||||
x
 
000:0
Loading…
Cancel
Save