Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch 8.2.2675: directory change in a terminal window shell is not fo…
…llowed Problem: Directory change in a terminal window shell is not followed. Solution: Add the 'autoshelldir' option. (closes #6290)
- Loading branch information
Showing
11 changed files
with
145 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -475,6 +475,35 @@ func Test_term_mouse() | |
call delete('Xbuf') | ||
endfunc | ||
|
||
" Test for sync buffer cwd with shell's pwd | ||
func Test_terminal_sync_shell_dir() | ||
CheckUnix | ||
" The test always use sh (see src/testdir/unix.vim). | ||
" However, BSD's sh doesn't seem to play well with OSC 7 escape sequence. | ||
CheckNotBSD | ||
|
||
set asd | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
brammool
Author
Contributor
|
||
" , is | ||
" 1. a valid character for directory names | ||
" 2. a reserved character in url-encoding | ||
let chars = ",a" | ||
" "," is url-encoded as '%2C' | ||
let chars_url = "%2Ca" | ||
let tmpfolder = fnamemodify(tempname(),':h').'/'.chars | ||
let tmpfolder_url = fnamemodify(tempname(),':h').'/'.chars_url | ||
call mkdir(tmpfolder, "p") | ||
let buf = Run_shell_in_terminal({}) | ||
call term_sendkeys(buf, "echo -ne $'\\e\]7;file://".tmpfolder_url."\\a'\<CR>") | ||
"call term_sendkeys(buf, "cd ".tmpfolder."\<CR>") | ||
call TermWait(buf) | ||
if has("mac") | ||
let expected = "/private".tmpfolder | ||
else | ||
let expected = tmpfolder | ||
endif | ||
call assert_equal(expected, getcwd(winnr())) | ||
endfunc | ||
|
||
" Test for modeless selection in a terminal | ||
func Test_term_modeless_selection() | ||
CheckUnix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
should not recover to default value later?