Gary Johnson wrote:
[...] > > I assume that mintty can't handle the escape sequences that do work for > > xterm. To find out which one please use a log: > > > > vim -N -u NONE -i NONE --log logfile --cmd 'set bg&' > > > > Around where you type the edit command you should be able to find some > > "raw key input:" and "raw terminal output:" lines that hopefully provide > > more information. > > I did that with TERM=xterm-256color and TERM=mintty and used vimdiff > to compare the two logfiles. I found the offending escape sequence, > but I don't know what it means. > > When TERM=xterm-256color, at the end of the "raw terminal output:" > line that prints the introductory message is the sequence > > ^[[?4m > > I looked in the xterm source, in the file ctlseqs.txt, but could not > find that sequence, i.e., CSI ? ... m. This is a new escape sequence that xterm version 377 supports. It is used to request the current modifyOtherKeys state. It was supposed to not do anything for existing terminals. It is documented here: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html Search for "XTQMODKEYS". I looked at what appears to be the page that explains escape sequences for Mintty: https://github.com/mintty/mintty/wiki/CtrlSeqs I cannot find this escape sequence there. Does this happen accidentally? You could ask the mintty project about it. > > You can also change the 'keyprotocol' option, e.g. make it empty, and > > see what effect that has. > > Adding the argument > > --cmd 'set keyprotocol=' > > or > > -c 'set keyprotocol=' > > had no effect, whether set before or after bg&: the font on the > command line was always tiny. Right, even when 'keyprotocol' is empty the "xterm" builtin terminal entries are still setup to use modifyOtherKeys. It looks like it is now OK to remove them and let the default 'keyprotocol' value do its work. > So the correct solution is to set TERM=mintty. I'll do that and see > if anything else breaks, although I don't use that computer much for > my current work, so I won't notice anything for a while. Yes, setting $TERM to "mintty" should work best. However, I suspect many users use some name starting with "xterm" and run into the same problem as you. > I would still like to know what that escape sequence is supposed to > do. If mintty's response seems to be a bug, then I'll report it to > the author. It would certainly be good to know if mintty intentionally uses this CSI code for something. It is unexpected, perhaps even a bug. -- msdn.microsoft.com: ERROR_SUCCESS 0 (0x0) The operation completed successfully. I have always suspected that for Microsoft success is an error. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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/20221202233522.74C1A1C5967%40moolenaar.net.
