Mercurial > vim-lawrencium
comparison plugin/lawrencium.vim @ 89:7fcb71064e85
More path escaping!
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 01 Jun 2014 15:33:22 -0700 |
parents | 08e0ab5985d2 |
children | 777063310a8d |
comparison
equal
deleted
inserted
replaced
88:08e0ab5985d2 | 89:7fcb71064e85 |
---|---|
796 endfunction | 796 endfunction |
797 | 797 |
798 " Include the generated HG usage file. | 798 " Include the generated HG usage file. |
799 let s:usage_file = expand("<sfile>:h:h") . "/resources/hg_usage.vim" | 799 let s:usage_file = expand("<sfile>:h:h") . "/resources/hg_usage.vim" |
800 if filereadable(s:usage_file) | 800 if filereadable(s:usage_file) |
801 execute "source " . s:usage_file | 801 execute "source " . fnameescape(s:usage_file) |
802 else | 802 else |
803 call s:error("Can't find the Mercurial usage file. Auto-completion will be disabled in Lawrencium.") | 803 call s:error("Can't find the Mercurial usage file. Auto-completion will be disabled in Lawrencium.") |
804 endif | 804 endif |
805 | 805 |
806 " Include the command file type mappings. | 806 " Include the command file type mappings. |
807 let s:file_type_mappings = expand("<sfile>:h:h") . '/resources/hg_command_file_types.vim' | 807 let s:file_type_mappings = expand("<sfile>:h:h") . '/resources/hg_command_file_types.vim' |
808 if filereadable(s:file_type_mappings) | 808 if filereadable(s:file_type_mappings) |
809 execute "source " . s:file_type_mappings | 809 execute "source " . fnameescape(s:file_type_mappings) |
810 endif | 810 endif |
811 | 811 |
812 function! s:CompleteHg(ArgLead, CmdLine, CursorPos) | 812 function! s:CompleteHg(ArgLead, CmdLine, CursorPos) |
813 " Don't do anything if the usage file was not sourced. | 813 " Don't do anything if the usage file was not sourced. |
814 if !exists('g:lawrencium_hg_commands') || !exists('g:lawrencium_hg_options') | 814 if !exists('g:lawrencium_hg_commands') || !exists('g:lawrencium_hg_options') |