Mercurial > vim-lawrencium
comparison plugin/lawrencium.vim @ 117:2e38e754c896
Correctly escape filename when opening a buffer from the status window.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Fri, 20 Feb 2015 13:35:19 -0800 |
parents | 7da11e029773 |
children | 4ca40abecc2a |
comparison
equal
deleted
inserted
replaced
116:7da11e029773 | 117:2e38e754c896 |
---|---|
1087 " if it happens to be the same file. | 1087 " if it happens to be the same file. |
1088 " We'll just have to clean up the default empty buffer created. | 1088 " We'll just have to clean up the default empty buffer created. |
1089 tabnew | 1089 tabnew |
1090 let l:cleanupbufnr = bufnr('%') | 1090 let l:cleanupbufnr = bufnr('%') |
1091 endif | 1091 endif |
1092 execute 'edit ' . escape(l:filename, ' \') | 1092 execute 'edit ' . fnameescape(l:filename) |
1093 if l:cleanupbufnr >= 0 | 1093 if l:cleanupbufnr >= 0 |
1094 execute 'bdelete ' . l:cleanupbufnr | 1094 execute 'bdelete ' . l:cleanupbufnr |
1095 endif | 1095 endif |
1096 endfunction | 1096 endfunction |
1097 | 1097 |