diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-09 15:57:37 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-09 15:57:37 +0200 |
commit | a45551a53557dba98973fdb3ff737dea2fffcda3 (patch) | |
tree | a34164c3e0a464ef9efd194068149e054a2045cf /src/testdir/term_util.vim | |
parent | 077a1e670ad69ef4cefc22103ca6635bd269e764 (diff) |
patch 8.2.0936: some terminals misinterpret the code for getting cursor stylev8.2.0936
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.
Diffstat (limited to 'src/testdir/term_util.vim')
-rw-r--r-- | src/testdir/term_util.vim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/testdir/term_util.vim b/src/testdir/term_util.vim index 2d66f38a58..df7cfa54cf 100644 --- 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, |