Mercurial > vim
view src/testdir/test_autochdir.vim @ 20474:3fe45aa3bbc5 v8.2.0791
patch 8.2.0791: a second popup window with terminal causes trouble
Commit: https://github.com/vim/vim/commit/b5383b174b2436b556f76f14badb1c1f55d6d8f6
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 18 19:46:48 2020 +0200
patch 8.2.0791: a second popup window with terminal causes trouble
Problem: A second popup window with terminal causes trouble.
Solution: Disallow opening a second terminal-popup window. (closes https://github.com/vim/vim/issues/6101,
closes #6103) Avoid defaulting to an invalid line number.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 18 May 2020 20:00:03 +0200 |
parents | 26a04a556982 |
children | 08940efa6b4e |
line wrap: on
line source
" Test 'autochdir' behavior source check.vim CheckOption autochdir func Test_set_filename() let cwd = getcwd() call test_autochdir() set acd let s:li = [] autocmd DirChanged auto call add(s:li, "autocd") autocmd DirChanged auto call add(s:li, expand("<afile>")) new w samples/Xtest call assert_equal("Xtest", expand('%')) call assert_equal("samples", substitute(getcwd(), '.*/\(\k*\)', '\1', '')) call assert_equal(["autocd", getcwd()], s:li) bwipe! au! DirChanged set noacd call chdir(cwd) call delete('samples/Xtest') endfunc