Mercurial > vim
diff src/testdir/term_util.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 | 6bcd12791bf1 |
children | 58137dbee8da |
line wrap: on
line diff
--- a/src/testdir/term_util.vim +++ b/src/testdir/term_util.vim @@ -44,6 +44,8 @@ endfunc " Returns the buffer number of the terminal. " " Options is a dictionary, these items are recognized: +" "keep_t_u7" - when 1 do not make t_u7 empty (resetting t_u7 avoids clearing +" parts of line 2 and 3 on the display) " "rows" - height of the terminal window (max. 20) " "cols" - width of the terminal window (max. 78) " "statusoff" - number of lines the status is offset from default @@ -74,7 +76,13 @@ func RunVimInTerminal(arguments, options let cols = get(a:options, 'cols', 75) let statusoff = get(a:options, 'statusoff', 1) - let cmd = GetVimCommandCleanTerm() .. a:arguments + if get(a:options, 'keep_t_u7', 0) + let reset_u7 = '' + else + let reset_u7 = ' --cmd "set t_u7=" ' + endif + + let cmd = GetVimCommandCleanTerm() .. reset_u7 .. a:arguments let options = { \ 'curwin': 1,