Skip to content

Commit

Permalink
vim: metarw: Fix not to hook fakepaths with short scheme name
Browse files Browse the repository at this point in the history
Add 2 rules on the name of a scheme - length and characters.

Fix autocommands not to hook fakepaths with any schene name which consists of
less than 2 characters.  Old definitions incorrectly recognized paths with
a drive letter in Microsoft Windows environment as a fakepath.
  • Loading branch information
kana committed Mar 28, 2010
1 parent 1784569 commit eb0070b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
8 changes: 8 additions & 0 deletions doc/metarw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ Scheme *metarw-scheme*
a fakepath. For example, the scheme of "git:master:src/ui.c" is
"git".

The name of a scheme must consist of 2 or more characters, and it
should consist of only lowercase, English alphabets.

Scheme script *metarw-scheme-script*
Support script to enable to read/write fakepathes. One scheme script
supports just one scheme.
Expand All @@ -269,6 +272,11 @@ BUGS *metarw-bugs*
CHANGELOG *metarw-changelog*

0.0.x 2008-08-10T12:19:52+09:00
- Fix autocommands not to hook fakepaths with any schene name which
consists of less than 2 characters. Old definitions incorrectly
recognized paths with a drive letter in Microsoft Windows
environment as a fakepath. (thanks to id:thinca)
- Add 2 rules on the name of a scheme (see |metarw-scheme|).
- Fix plugin/metarw.vim to be properly reloadable.
- Fix requirements - metarw uses |fnameescape()| which is added since
Vim 7.1.299. (thanks to id:thinca)
Expand Down
12 changes: 6 additions & 6 deletions plugin/metarw.vim
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ endif

augroup plugin-metarw
autocmd!
autocmd BufReadCmd *:{*,*/*} call metarw#_event_handler('BufReadCmd')
autocmd BufWriteCmd *:{*,*/*} call metarw#_event_handler('BufWriteCmd')
autocmd FileAppendCmd *:{*,*/*} call metarw#_event_handler('FileAppendCmd')
autocmd FileReadCmd *:{*,*/*} call metarw#_event_handler('FileReadCmd')
autocmd FileWriteCmd *:{*,*/*} call metarw#_event_handler('FileWriteCmd')
autocmd SourceCmd *:{*,*/*} call metarw#_event_handler('SourceCmd')
autocmd BufReadCmd ??*:{*,*/*} call metarw#_event_handler('BufReadCmd')
autocmd BufWriteCmd ??*:{*,*/*} call metarw#_event_handler('BufWriteCmd')
autocmd FileAppendCmd ??*:{*,*/*} call metarw#_event_handler('FileAppendCmd')
autocmd FileReadCmd ??*:{*,*/*} call metarw#_event_handler('FileReadCmd')
autocmd FileWriteCmd ??*:{*,*/*} call metarw#_event_handler('FileWriteCmd')
autocmd SourceCmd ??*:{*,*/*} call metarw#_event_handler('SourceCmd')
augroup END


Expand Down

0 comments on commit eb0070b

Please sign in to comment.