Mercurial > vim
comparison src/testdir/test_terminal.vim @ 20768:1e2e81dbb958 v8.2.0936
patch 8.2.0936: some terminals misinterpret the code for getting cursor style
Commit: https://github.com/vim/vim/commit/a45551a53557dba98973fdb3ff737dea2fffcda3
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 9 15:57:37 2020 +0200
patch 8.2.0936: some terminals misinterpret the code for getting cursor style
Problem: Some terminals misinterpret the code for getting cursor style.
Solution: Send a sequence to the terminal and check the result. (IWAMOTO
Kouichi, closes #2126) Merged with current code.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 09 Jun 2020 16:00:05 +0200 |
parents | c81f61e3b508 |
children | a35036006352 |
comparison
equal
deleted
inserted
replaced
20767:c7edd278df99 | 20768:1e2e81dbb958 |
---|---|
2463 in a popup window | 2463 in a popup window |
2464 END | 2464 END |
2465 call writefile(text, 'Xtext') | 2465 call writefile(text, 'Xtext') |
2466 let cmd = GetVimCommandCleanTerm() | 2466 let cmd = GetVimCommandCleanTerm() |
2467 let lines = [ | 2467 let lines = [ |
2468 \ 'set t_u7=', | |
2469 \ 'call setline(1, range(20))', | 2468 \ 'call setline(1, range(20))', |
2470 \ 'hi PopTerm ctermbg=grey', | 2469 \ 'hi PopTerm ctermbg=grey', |
2471 \ 'func OpenTerm(setColor)', | 2470 \ 'func OpenTerm(setColor)', |
2472 \ " set noruler", | 2471 \ " set noruler", |
2473 \ " let s:buf = term_start('" .. cmd .. " Xtext', #{hidden: 1, term_finish: 'close'})", | 2472 \ " let s:buf = term_start('" .. cmd .. " Xtext', #{hidden: 1, term_finish: 'close'})", |
2543 to show | 2542 to show |
2544 in a popup window | 2543 in a popup window |
2545 END | 2544 END |
2546 call writefile(text, 'Xtext') | 2545 call writefile(text, 'Xtext') |
2547 let lines = [ | 2546 let lines = [ |
2548 \ 'set t_u7=', | |
2549 \ 'call setline(1, range(20))', | 2547 \ 'call setline(1, range(20))', |
2550 \ 'func OpenTerm()', | 2548 \ 'func OpenTerm()', |
2551 \ " let s:buf = term_start('cat Xtext', #{hidden: 1})", | 2549 \ " let s:buf = term_start('cat Xtext', #{hidden: 1})", |
2552 \ ' let g:winid = popup_create(s:buf, #{ border: []})', | 2550 \ ' let g:winid = popup_create(s:buf, #{ border: []})', |
2553 \ 'endfunc', | 2551 \ 'endfunc', |
2573 func Terminal_in_popup_colored(group_name, highlight_cmd, highlight_opt) | 2571 func Terminal_in_popup_colored(group_name, highlight_cmd, highlight_opt) |
2574 CheckRunVimInTerminal | 2572 CheckRunVimInTerminal |
2575 CheckUnix | 2573 CheckUnix |
2576 | 2574 |
2577 let lines = [ | 2575 let lines = [ |
2578 \ 'set t_u7=', | |
2579 \ 'call setline(1, range(20))', | 2576 \ 'call setline(1, range(20))', |
2580 \ 'func OpenTerm()', | 2577 \ 'func OpenTerm()', |
2581 \ " let s:buf = term_start('cat', #{hidden: 1, " | 2578 \ " let s:buf = term_start('cat', #{hidden: 1, " |
2582 \ .. a:highlight_opt .. "})", | 2579 \ .. a:highlight_opt .. "})", |
2583 \ ' let g:winid = popup_create(s:buf, #{ border: []})', | 2580 \ ' let g:winid = popup_create(s:buf, #{ border: []})', |