Mercurial > vim
comparison src/testdir/test_terminal.vim @ 20097:165ec447ca77 v8.2.0604
patch 8.2.0604: :startinsert in a terminal window used later
Commit: https://github.com/vim/vim/commit/eb58a2465825c258beafae96240824923f73779f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 19 18:13:19 2020 +0200
patch 8.2.0604: :startinsert in a terminal window used later
Problem: :startinsert in a terminal window used later.
Solution: Ignore :startinsert in a terminal window. (closes https://github.com/vim/vim/issues/5952)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Apr 2020 18:15:04 +0200 |
parents | b07672d13ff9 |
children | 2fb397573541 |
comparison
equal
deleted
inserted
replaced
20096:f68ea7ef5ab2 | 20097:165ec447ca77 |
---|---|
2610 call TermWait(g:buf0, 50) | 2610 call TermWait(g:buf0, 50) |
2611 exe g:buf0 .. 'bwipe!' | 2611 exe g:buf0 .. 'bwipe!' |
2612 set hidden& | 2612 set hidden& |
2613 endfunc | 2613 endfunc |
2614 | 2614 |
2615 func Test_term_and_startinsert() | |
2616 CheckRunVimInTerminal | |
2617 CheckUnix | |
2618 | |
2619 let lines =<< trim EOL | |
2620 put='some text' | |
2621 term | |
2622 startinsert | |
2623 EOL | |
2624 call writefile(lines, 'XTest_startinsert') | |
2625 let buf = RunVimInTerminal('-S XTest_startinsert', {}) | |
2626 | |
2627 call term_sendkeys(buf, "exit\r") | |
2628 call WaitForAssert({-> assert_equal("some text", term_getline(buf, 1))}) | |
2629 call term_sendkeys(buf, "0l") | |
2630 call term_sendkeys(buf, "A<\<Esc>") | |
2631 call WaitForAssert({-> assert_equal("some text<", term_getline(buf, 1))}) | |
2632 | |
2633 call StopVimInTerminal(buf) | |
2634 call delete('XTest_startinsert') | |
2635 endfunc | |
2636 | |
2615 " vim: shiftwidth=2 sts=2 expandtab | 2637 " vim: shiftwidth=2 sts=2 expandtab |