Mercurial > vim
comparison src/testdir/test_autocmd.vim @ 13752:8a3e9d1e8cf9 v8.0.1748
patch 8.0.1748: CmdlineEnter command uses backslash instead of slash
commit https://github.com/vim/vim/commit/a4baf5b32519855bb176a7aa0e9397c137ca890a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 22 13:27:44 2018 +0200
patch 8.0.1748: CmdlineEnter command uses backslash instead of slash
Problem: CmdlineEnter command uses backslash instead of slash.
Solution: Don't treat the character as a file name. (closes https://github.com/vim/vim/issues/2837)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 22 Apr 2018 13:30:08 +0200 |
parents | 7d2039b2ecc8 |
children | 415185e2c970 |
comparison
equal
deleted
inserted
replaced
13751:0d0adce4320a | 13752:8a3e9d1e8cf9 |
---|---|
835 call assert_equal(':', g:entered) | 835 call assert_equal(':', g:entered) |
836 call assert_equal(':', g:left) | 836 call assert_equal(':', g:left) |
837 au! CmdlineEnter | 837 au! CmdlineEnter |
838 au! CmdlineLeave | 838 au! CmdlineLeave |
839 | 839 |
840 let save_shellslash = &shellslash | |
841 set noshellslash | |
840 au! CmdlineEnter / let g:entered = expand('<afile>') | 842 au! CmdlineEnter / let g:entered = expand('<afile>') |
841 au! CmdlineLeave / let g:left = expand('<afile>') | 843 au! CmdlineLeave / let g:left = expand('<afile>') |
842 let g:entered = 0 | 844 let g:entered = 0 |
843 let g:left = 0 | 845 let g:left = 0 |
844 new | 846 new |
847 call assert_equal('/', g:entered) | 849 call assert_equal('/', g:entered) |
848 call assert_equal('/', g:left) | 850 call assert_equal('/', g:left) |
849 bwipe! | 851 bwipe! |
850 au! CmdlineEnter | 852 au! CmdlineEnter |
851 au! CmdlineLeave | 853 au! CmdlineLeave |
854 let &shellslash = save_shellslash | |
852 endfunc | 855 endfunc |
853 | 856 |
854 " Test for BufWritePre autocommand that deletes or unloads the buffer. | 857 " Test for BufWritePre autocommand that deletes or unloads the buffer. |
855 func Test_BufWritePre() | 858 func Test_BufWritePre() |
856 %bwipe | 859 %bwipe |