Skip to content

Commit

Permalink
Version 1.3
Browse files Browse the repository at this point in the history
If the buffer is not in the buffer list the sign cannot be added when you reload the marks from a file.
当你重新读取保存在文件里的标记时,如果那个标记所在的buffer没有在当前的buffer list里面的时候,不能正确的显示标记。
  • Loading branch information
Hongli Gao authored and vim-scripts committed Oct 18, 2010
1 parent 1a691ab commit 11f1037
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugin/marks_corey.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
" Vim plugin for showing marks using number array.
" Maintainer: Hongli Gao <left.slipper at gmail dot com>
" Last Change: 2008 April 12
" Last Change: 2009 August 27
"
" USAGE:
" Copy this file to your vim's plugin folder.
Expand Down Expand Up @@ -141,8 +141,9 @@ fun! Save_signs_to_file()
for item in s:mylist
let tempList = tempList + [item[0] . "#" . item[1]. "#" . item[2]]
endfor
let writeFlag = writefile(tempList, s:outputFileName)

if exists("g:Signs_file_path_corey")
let writeFlag = writefile(tempList, s:outputFileName)
endif
endfun
" ---------------------------------------------------------------------
" Load_signs_from_file
Expand Down Expand Up @@ -201,9 +202,11 @@ endfun
fun! s:Flash_signs()

silent! exe 'sign unplace *'
silent! exe 'sign undefine *'
if len(s:mylist) > 1
for item in s:mylist
silent! exe 'sign define CS' . item[0] . ' text='. item[0] .' texthl=ErrorMsg'
silent! exe 'badd ' . item[2]
silent! exe 'sign place ' . item[0] . ' line=' . item[1] . ' name=CS'. item[0] . ' file=' . item[2]
endfor
endif
Expand Down

0 comments on commit 11f1037

Please sign in to comment.