Hi,
On Tue, May 12, 2020 at 8:24 AM Vladimir Lomov <[email protected]>
wrote:
> Hello Yegappan,
>
> Is the terminal an xterm compatible terminal?
>
> Dunno,
>
> In the above command, you are setting TERM to xterm.
>
> This is how make test is run in "build" script (I'm using Archlinux and
> to run test PKGBUILD uses
>
> TERM=xterm make -j1 test
>
> and I think it is used to be sure that TERM is xterm regardless of used
> terminal emulator).
>
> Can you try running the test with TERM set to xterm-kitty?
>
> I did even more, I tested several TERM in kitty and alacritty and results
> a bit strange to me:
>
> terminal \ TERM | xterm | xterm-kitty | alacritty | tmux-256color |
> ----------------+-------+-------------+-----------+---------------+
> kitty | F | S | F | F |
> alacritty | F | S | F | F |
> ----------------+-------+-------------+-----------+---------------+
>
> F - fail;
> S - success;
>
>
This table confirms that when the TERM is set to xterm-kitty (according to
the kitty FAQ,
this is the proper value for TERM), the Vim terminal key code translation
works correctly.
For all the other TERM settings, the key code translation is not correct.
> These all is SSH session but outside tmux session.
>
> I didn't do
>
> $ cd vim/src/testdir
> $ ../vim -u NONE -S runtest.vim test_terminal.vim
> Test_term_keycode_translation
>
> I simply ran TERM=XXXX make -j1 test.
>
> After running the above command, look at the contents of the test.log and
> messages files.
>
> I ran the command in kitty with TERM=xterm-kitty (i.e. not setting TERM
> manually) but it ran very quickly and didn't produce test.log. Is it Ok?
> Any other TERM gives test.log:
>
Yes. If the test succeeds, then the test.log file will be empty. In case of
test failures,
the error messages will be added to test.log.
>
> From test_terminal.vim:
> Found errors in Test_term_keycode_translation():
> Run 1:
> function RunTheTest[39]..Test_term_keycode_translation line 30: Expected
> ['<F1>', '<F2>', '<F3>', '<F4>', '<F5>', '<F6>', '<F7>', '<F8>', '<F9>',
> '<F10>', '<F11>', '<F12>', '<Home>', '<S-Home>', '<C-Home>', '<End>',
> '<S-End>', '<C-End>', '<Insert>', '<Del>', '<Left>', '<S-Left>', '<C-Left>',
> '<Right>', '<S-Right>', '<C-Right>', '<Up>', '<S-Up>', '<Down>', '<S-Down>',
> '0123456789', '\t\t.+-*/'] but got ['<F1>', '<F2>', '<F3>', '<F4>', '<F5>',
> '<F6>', '<F7>', '<F8>', '<F9>', '<F10>', '<F11>', '<F12>', '<Home>',
> '<S-Home>', '<C-Home>', '<End>', '<S-End>', '<C-End>', '<Insert>', '<Del>',
> '<Left>', '', '\t\t.+-*/<S-Left>', '<C-Left>', '<Right>', '<S-Right>',
> '<C-Right>', '<Up>', '<S-Up>', '<Down>', '<S-Down>', '45678012']
> Run 2:
> function RunTheTest[39]..Test_term_keycode_translation line 30: Expected
> ['<F1>', '<F2>', '<F3>', '<F4>', '<F5>', '<F6>', '<F7>', '<F8>', '<F9>',
> '<F10>', '<F11>', '<F12>', '<Home>', '<S-Home>', '<C-Home>', '<End>',
> '<S-End>', '<C-End>', '<Insert>', '<Del>', '<Left>', '<S-Left>', '<C-Left>',
> '<Right>', '<S-Right>', '<C-Right>', '<Up>', '<S-Up>', '<Down>', '<S-Down>',
> '0123456789', '\t\t.+-*/'] but got ['<F1>', '<F2>', '<F3>', '<F4>', '<F5>',
> '<F6>', '<F7>', '<F8>', '<F9>', '<F10>', '<F11>', '<F12>', '<Home>',
> '<S-Home>', '<C-Home>', '<End>', '<S-End>', '<C-End>', '<Insert>', '<Del>',
> '<Left>', '', '\t\t.+-*/<S-Left>', '<C-Left>', '<Right>', '<S-Right>',
> '<C-Right>', '<Up>', '<S-Up>', '<Down>', '<S-Down>', '45678012']
> Flaky test failed too often, giving up
>
> then ran :call term_start('vim'), switched to the 'terminal' window
>
> Could you give a bit more instruction because I'm totally confused. If I
> run
>
> $ ./vim --clean -u NONE
>
> and in "terminal" window enter CTRL-K<Left>... I get strange results but
> if I run
>
> $ ./vim
>
> I get
>
> <Left><S-Left><C-Left><Right><S-Right><C-Right><Up><S-Up><Down><S-Down>
>
> with both TERM=xterm and TERM=xterm-kitty. I thought that --clean -u NONE
> ensures that vim won't use any user configuration but with them vim gives
> me weird output.
>
>
> This is expected. When you invoke Vim with "-u NONE", it runs in
Vi-compatible
mode. In Vi-compatible mode, the escape sequences for special keys may not
be recognized correctly. When you run in non-compatible mode, the escape
sequences are properly recognized.
Regards,
Yegappan
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/CAAW7x7kv5Hhm%2BZ6NahABPEqx4zHNE2KSRytUNUpL%2BJ9%2Bf0KYUg%40mail.gmail.com.