Mercurial > vim
comparison src/testdir/test_functions.vim @ 33146:351d2bbfe921 v9.0.1855
patch 9.0.1855: mode() doesn't indicate command line for terminal
Commit: https://github.com/vim/vim/commit/71ebf3bacaa22c841d9a8cb050c52fb21ac0970a
Author: h-east <h.east.727@gmail.com>
Date: Sun Sep 3 17:12:55 2023 +0200
patch 9.0.1855: mode() doesn't indicate command line for terminal
Problem: mode() doesn't indicate command line for terminal
Solution: make it return 'ct' for command-line from Terminal mode
closes: #6265
closes: #13017
closes: #13018
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 03 Sep 2023 17:30:03 +0200 |
parents | b2c506f480c7 |
children | def9fc5c92d1 |
comparison
equal
deleted
inserted
replaced
33145:97b3a859483b | 33146:351d2bbfe921 |
---|---|
933 execute "normal! gR\<C-o>g@l\<Esc>" | 933 execute "normal! gR\<C-o>g@l\<Esc>" |
934 call assert_equal('n-niV', g:current_modes) | 934 call assert_equal('n-niV', g:current_modes) |
935 | 935 |
936 if has('terminal') | 936 if has('terminal') |
937 term | 937 term |
938 " Terminal-Job mode | |
939 call assert_equal('t', mode()) | |
940 call assert_equal('t', mode(1)) | |
941 call feedkeys("\<C-W>:echo \<C-R>=Save_mode()\<C-U>\<CR>", 'xt') | |
942 call assert_equal("c-ct", g:current_modes) | |
943 call feedkeys("\<Esc>", 'xt') | |
944 | |
945 " Terminal-Normal mode | |
938 call feedkeys("\<C-W>N", 'xt') | 946 call feedkeys("\<C-W>N", 'xt') |
939 call assert_equal('n', mode()) | 947 call assert_equal('n', mode()) |
940 call assert_equal('nt', mode(1)) | 948 call assert_equal('nt', mode(1)) |
949 call feedkeys(":echo \<C-R>=Save_mode()\<C-U>\<CR>", 'xt') | |
950 call assert_equal("c-c", g:current_modes) | |
941 call feedkeys("aexit\<CR>", 'xt') | 951 call feedkeys("aexit\<CR>", 'xt') |
942 endif | 952 endif |
943 | 953 |
944 bwipe! | 954 bwipe! |
945 iunmap <F2> | 955 iunmap <F2> |