[vim/vim] Unable to use vim in kitty: Already at oldest change (Issue #11638)

720 views
Skip to first unread message

icaro-meneses

unread,
Nov 28, 2022, 3:08:17 PM11/28/22
to vim/vim, Subscribed

When I go to use vim, no matter what command I use, e.g :q, :w, :e file, vim just returns "Already at oldest change".

Information:

kitty version: 0.26.5
Vim version: 9.0.965

OS: Arch Linux x86_64
Kernel: 6.0.10-arch2-1
Uptime: 3 hours, 34 mins
Packages: 1456 (pacman)
Shell: zsh 5.9
Resolution: 1920x1080
WM: i3
Theme: Adwaita [GTK2/3]
Icons: Adwaita [GTK2/3]
terminal: kitty
CPU: Intel i5-4440 (4) @ 3300GHz
GPU: Intel HD Graphics

Here is a gif demonstrating the problem.
vim-error-kitty

Also, a minimal .vimrc configuration file.

filetype plugin on
syntax on
set encoding=utf-8

set number				
set relativenumber	
set linebreak			
set showbreak=>>>>		
set textwidth=79		
set showmatch			
set errorbells			
set visualbell			

set hlsearch			
set ignorecase
set smartcase			
set incsearch			

set autoindent			
set noexpandtab
set shiftwidth=4		
set tabstop=4
set softtabstop=4		
set splitright			
set splitbelow

set ruler			

set backupdir=/tmp
set directory=~/.vim/tmp,.

set undolevels=1000		
set backspace=indent,eol,start


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638@github.com>

Bram Moolenaar

unread,
Nov 28, 2022, 3:41:03 PM11/28/22
to vim/vim, Subscribed

It works fine for me.

Try starting Vim with vim --clean or vim -u NONE.

What is the output of :set termcap ?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329736920@github.com>

icaro-meneses

unread,
Nov 28, 2022, 4:04:33 PM11/28/22
to vim/vim, Subscribed

I started Vim with vim --clean and the problem remains.

And as for the output of :set termcap, I can't even finish typing the command, so I can't tell you the output of it.

Note: Vim didn't have this issue in version 9.0.910, from the official Arch Linux repository, but I had to do get version 9.0.965, as I had the same issues as the issue clangd/coc-clangd#529 and neoclide/coc.nvim#4396.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329758703@github.com>

icaro-meneses

unread,
Nov 28, 2022, 4:07:12 PM11/28/22
to vim/vim, Subscribed

Performing a test by opening an instance of kitty via terminal, when I start Vim, I get these log messages:

[332 18:04:52.693666] [PARSE ERROR] Unrecognized DCS code: 0x7a
[332 18:04:52.693686] [PARSE ERROR] Unknown CSI code: 'm' with start_modifier: '' and end_modifier: '%' and parameters: '0'


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329762167@github.com>

Bram Moolenaar

unread,
Nov 28, 2022, 4:41:39 PM11/28/22
to vim/vim, Subscribed

The kitty version I have is 0.21.2. That is the latest Ubuntu package.
I don't know why it is behind version 0.26.5 that much, more than a year.

I also see that "Unknown CSI code" error, but it doesn't cause problems for me.

It might be a bug in the Kitty version that you are using. Can you try an older one?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329794522@github.com>

icaro-meneses

unread,
Nov 28, 2022, 5:33:37 PM11/28/22
to vim/vim, Subscribed

The problem persists in version 0.21.2, where I did the build from source.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329841844@github.com>

Christopher Plewright

unread,
Nov 28, 2022, 6:01:10 PM11/28/22
to vim/vim, Subscribed

I see it too; does it cause any real issue?

> kitty --version
kitty 0.26.5 created by Kovid Goyal

> kitty vim --clean
[333 09:56:00.475159] [PARSE ERROR] Unrecognized DCS code: 0x7a
[333 09:56:00.475205] [PARSE ERROR] Unknown CSI code: 'm' with start_modifier: '' and end_modifier: '%' and parameters: '0'


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329863550@github.com>

Christopher Plewright

unread,
Nov 28, 2022, 6:44:55 PM11/28/22
to vim/vim, Subscribed

Edit: I don't see that problem of it hanging and saying: Already at oldest change.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329891618@github.com>

icaro-meneses

unread,
Nov 28, 2022, 6:58:50 PM11/28/22
to vim/vim, Subscribed

Sorry, I really don't know what could be going on with kitty/vim.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329899188@github.com>

icaro-meneses

unread,
Nov 28, 2022, 7:04:16 PM11/28/22
to vim/vim, Subscribed

Edit: I don't see that problem of it hanging and saying: Already at oldest change.

What is your Vim version? I already tested with the versions 9.0.950, 9.0.960 and 9.0.961 and the problem persists. With the version 9.0.910, the problem doesn't occur.

Note: I made the installation of version 9.0.910 via pacman -S gvim.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329902627@github.com>

Bram Moolenaar

unread,
Nov 28, 2022, 7:45:29 PM11/28/22
to vim/vim, Subscribed

Since 9.0.0930 enables the kitty keyboard protocol. I guess the escape sequences it produces somehow are not understood in your setup. These end in the "u" character, which will try to undo if the escape sequence isn't recognized.

I don't have any clue what is wrong with your setup. You could try using vim --cmd "set keyprotocol=". That's not a solution though.

Hmm, does the :version output show "+termresponse"? Without that the keys would not be recognized.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329929995@github.com>

Shane-XB-Qian

unread,
Nov 28, 2022, 8:37:30 PM11/28/22
to vim/vim, Subscribed

@brammool 4bc85f2 perhaps the kitty author @kovidgoyal had answer you something.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329962667@github.com>

Shane-XB-Qian

unread,
Nov 28, 2022, 8:38:48 PM11/28/22
to vim/vim, Subscribed

4bc85f2#r87559346


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329963390@github.com>

Christopher Plewright

unread,
Nov 28, 2022, 8:47:13 PM11/28/22
to vim/vim, Subscribed

@icaro-meneses


What is your Vim version?

Sorry, I should have mentioned, Vim build on my archlinux is 9.0.0946. Self built.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329968039@github.com>

Kovid Goyal

unread,
Nov 28, 2022, 9:29:02 PM11/28/22
to vim/vim, Subscribed

The messages about unknown codes being sent by vim are harmless (they have been around forever). I can say that vim 9.0.969 works for me with kitty from master or kitty 0.26.5 (on ArchLinux). With this commit kovidgoyal/kitty@1305199 you will see the exact bytes being sent for every key event by kitty.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329993705@github.com>

Christopher Plewright

unread,
Nov 28, 2022, 9:29:25 PM11/28/22
to vim/vim, Subscribed

@icaro-meneses

I just built a fresh install from git latest master branch. ie. 9.0 patch level 969

Still unable to reproduce the problem of: Already at oldest change. when opening it in Kitty. It just works fine for me, no error.

It's possible that it might be separate issue to the "Unknown CSI code" error, because I still get that.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329993899@github.com>

Christopher Plewright

unread,
Nov 28, 2022, 9:32:45 PM11/28/22
to vim/vim, Subscribed

@icaro-meneses

Maybe something different in your dependencies when you built vim? Or when you build kitty?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329995587@github.com>

Kovid Goyal

unread,
Nov 28, 2022, 9:36:11 PM11/28/22
to vim/vim, Subscribed

You should run as

kitty --debug-input --config=NONE vim -u NONE

and see if the problem occurs.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1329997335@github.com>

Shane-XB-Qian

unread,
Nov 28, 2022, 9:41:47 PM11/28/22
to vim/vim, Subscribed

i cannot repro this case with latest vim build in kitty.
but i do see that unknow csi code ... something, and specially when i exited the vim instance there is ^[[?1u^[[>1;4000;21c, do you have idea what is that?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330000358@github.com>

Shane-XB-Qian

unread,
Nov 28, 2022, 9:57:56 PM11/28/22
to vim/vim, Subscribed

that ^[[?1u^[[>1;4000;21c perhaps not from kitty, but perhaps should ate it if not recognized it.
// interesting thing is when i use kitty with gnu-screen, then such escape code looks ate by gnu-screen. :-)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330008543@github.com>

Kovid Goyal

unread,
Nov 28, 2022, 10:02:37 PM11/28/22
to vim/vim, Subscribed

That is the textual representation of the escape code used to query for the keyboard protocol. Where are you seeing it? And if you use screen you wont be using the keyboard protocol at all because IIRC vim gates detection of it based on TERM. When testing please keep things simple. Run only vim and kitty.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330011316@github.com>

Kovid Goyal

unread,
Nov 28, 2022, 10:04:05 PM11/28/22
to vim/vim, Subscribed

The kitty version I have is 0.21.2. That is the latest Ubuntu package. I don't know why it is behind version 0.26.5 that much, more than a year.

Distro packages are often very outdated of lots of software. For kitty, you can use the official binaries from https://sw.kovidgoyal.net/kitty/binary/ to test up-to-date kitty.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330012371@github.com>

Shane-XB-Qian

unread,
Nov 28, 2022, 10:17:13 PM11/28/22
to vim/vim, Subscribed

That is the textual representation of the escape code used to query for the keyboard protocol. Where are you seeing it?

when i just exited the vim, that should be related to my some vimrc or plugin, just not sure which one, but anyway if it cannot be recoginized by kitty then i think it should be ate which not just output to cli.

When testing please keep things simple. Run only vim and kitty.

yea, i was just trying to do a comparsion, it worked within gnu-screen (that escape code ate by it)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330021487@github.com>

Kovid Goyal

unread,
Nov 28, 2022, 11:45:37 PM11/28/22
to vim/vim, Subscribed

That's not something to be eaten by kitty, that's the response sent by kitty to the query sent by vim. You presumably quit vim before the response was received and processed by vim. And again inside screen vim will not even make the query.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330071181@github.com>

icaro-meneses

unread,
Nov 28, 2022, 11:51:24 PM11/28/22
to vim/vim, Subscribed

Since 9.0.0930 enables the kitty keyboard protocol. I guess the escape sequences it produces somehow are not understood in your setup. These end in the "u" character, which will try to undo if the escape sequence isn't recognized.

I don't have any clue what is wrong with your setup. You could try using vim --cmd "set keyprotocol=". That's not a solution though.

Hmm, does the :version output show "+termresponse"? Without that the keys would not be recognized.

Desculpa pela demora, eu precisei me ausentar por um momento.

Esta é a saída do vim --version, obtida pelo terminal kitty:

$ vim --version                                                                                                                                                                                                

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Nov 28 2022 16:53:17)

Included patches: 1-965

Compiled by icaro

Huge version with GTK3 GUI.  Features included (+) or not (-):

+acl               +file_in_path      +mouse_urxvt       -tag_any_white

+arabic            +find_in_path      +mouse_xterm       -tcl

+autocmd           +float             +multi_byte        +termguicolors

+autochdir         +folding           +multi_lang        +terminal

-autoservername    -footer            -mzscheme          +terminfo

+balloon_eval      +fork()            +netbeans_intg     +termresponse

+balloon_eval_term +gettext           +num64             +textobjects

+browse            -hangul_input      +packages          +textprop

++builtin_terms    +iconv             +path_extra        +timers

+byte_offset       +insert_expand     -perl              +title

+channel           +ipv6              +persistent_undo   +toolbar

+cindent           +job               +popupwin          +user_commands

+clientserver      +jumplist          +postscript        +vartabs

+clipboard         +keymap            +printer           +vertsplit

+cmdline_compl     +lambda            +profile           +vim9script

+cmdline_hist      +langmap           -python            +viminfo

+cmdline_info      +libcall           -python3           +virtualedit

+comments          +linebreak         +quickfix          +visual

+conceal           +lispindent        +reltime           +visualextra

+cryptv            +listcmds          +rightleft         +vreplace

+cscope            +localmap          -ruby              +wildignore

+cursorbind        -lua               +scrollbind        +wildmenu

+cursorshape       +menu              +signs             +windows

+dialog_con_gui    +mksession         +smartindent       +writebackup

+diff              +modify_fname      +sodium            +X11

+digraphs          +mouse             +sound             -xfontset

+dnd               +mouseshape        +spell             +xim

-ebcdic            +mouse_dec         +startuptime       +xpm

+emacs_tags        +mouse_gpm         +statusline        +xsmp_interact

+eval              -mouse_jsbterm     -sun_workshop      +xterm_clipboard

+ex_extra          +mouse_netterm     +syntax            -xterm_save

+extra_search      +mouse_sgr         +tag_binary        

-farsi             -mouse_sysmouse    -tag_old_static    

   system vimrc file: "$VIM/vimrc"

     user vimrc file: "$HOME/.vimrc"

 2nd user vimrc file: "~/.vim/vimrc"

      user exrc file: "$HOME/.exrc"

  system gvimrc file: "$VIM/gvimrc"

    user gvimrc file: "$HOME/.gvimrc"

2nd user gvimrc file: "~/.vim/gvimrc"

       defaults file: "$VIMRUNTIME/defaults.vim"

    system menu file: "$VIMRUNTIME/menu.vim"

  fall-back for $VIM: "/usr/local/share/vim"

Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -pthread -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 

Linking: gcc -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lelf -lcanberra -lsodium -lacl -lattr -lgpm

I did the Vim build process using the following commands:

./configure --enable-fail-if-missing --with-features=huge \                                                                                                                                                   

            --with-x=yes \

            --enable-gui=gtk3 \

            --enable-gtk3-check


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330073904@github.com>

Shane-XB-Qian

unread,
Nov 28, 2022, 11:57:11 PM11/28/22
to vim/vim, Subscribed

aha... how come it happened... or anyway if that vim instance had been exited, kitty would/should not ate or discard that escape code? or whatever perhaps that's also the interesting thing this case here...
this is my first usage strange feeling on kitty. :-)

--
shane.xb.qian


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330076623@github.com>

icaro-meneses

unread,
Nov 28, 2022, 11:59:53 PM11/28/22
to vim/vim, Subscribed

@kovidgoyal

You should run as

kitty --debug-input --config=NONE vim -u NONE

and see if the problem occurs.

I did the test with the command you suggested and I got the following output:

kitty --debug-input --config=NONE vim -u NONE                                                                                                                                                                                            ─╯

Loading new XKB keymaps

Modifier indices alt: 0x3 super: 0x6 hyper: 0xffffffff meta: 0xffffffff numlock: 0x4 shift: 0x0 capslock: 0x1

Move x: 16.0 y: 343.0 grabbed: 0

Move x: 42.0 y: 359.0 grabbed: 0

Move x: 64.0 y: 369.0 grabbed: 0

Move x: 88.0 y: 379.0 grabbed: 0

Move x: 114.0 y: 391.0 grabbed: 0

Move x: 142.0 y: 403.0 grabbed: 0

Move x: 174.0 y: 419.0 grabbed: 0

Move x: 204.0 y: 433.0 grabbed: 0

Move x: 234.0 y: 445.0 grabbed: 0

Move x: 258.0 y: 455.0 grabbed: 0

Move x: 276.0 y: 463.0 grabbed: 0

Move x: 284.0 y: 469.0 grabbed: 0

Move x: 285.0 y: 471.0 grabbed: 0

Move x: 286.0 y: 472.0 grabbed: 0

Press xkb_keycode: 0x32 clean_sym: Shift_L composed_sym: Shift_L mods: numlock glfw_key: 57441 (LEFT_SHIFT) xkb_key: 65505 (Shift_L)

on_key_input: glfw key: 0xe061 native_code: 0xffe1 action: PRESS mods: numlock text: '' state: 0 ignoring as keyboard mode does not support encoding this event

Press xkb_keycode: 0x3d clean_sym: semicolon composed_sym: colon text: : mods: shift+numlock glfw_key: 59 (;) xkb_key: 59 (semicolon) shifted_key: 58 (:) alternate_key: 47 (/)

on_key_input: glfw key: 0x3b native_code: 0x3b action: PRESS mods: shift+numlock text: ':' state: 0 sent key as text to child

Release xkb_keycode: 0x3d clean_sym: semicolon mods: shift+numlock glfw_key: 59 (;) xkb_key: 59 (semicolon) shifted_key: 58 (:) alternate_key: 47 (/)

on_key_input: glfw key: 0x3b native_code: 0x3b action: RELEASE mods: shift+numlock text: '' state: 0 ignoring as keyboard mode does not support encoding this event

Release xkb_keycode: 0x32 clean_sym: Shift_L mods: shift+numlock glfw_key: 57441 (LEFT_SHIFT) xkb_key: 65505 (Shift_L)

on_key_input: glfw key: 0xe061 native_code: 0xffe1 action: RELEASE mods: shift+numlock text: '' state: 0 ignoring as keyboard mode does not support encoding this event

Press xkb_keycode: 0x18 clean_sym: q composed_sym: q text: q mods: numlock glfw_key: 113 (q) xkb_key: 113 (q)

on_key_input: glfw key: 0x71 native_code: 0x71 action: PRESS mods: numlock text: 'q' state: 0 sent key as text to child

Release xkb_keycode: 0x18 clean_sym: q mods: numlock glfw_key: 113 (q) xkb_key: 113 (q)

on_key_input: glfw key: 0x71 native_code: 0x71 action: RELEASE mods: numlock text: '' state: 0 ignoring as keyboard mode does not support encoding this event

Press xkb_keycode: 0x24 clean_sym: Return composed_sym: Return mods: numlock glfw_key: 57345 (ENTER) xkb_key: 65293 (Return)

on_key_input: glfw key: 0xe001 native_code: 0xff0d action: PRESS mods: numlock text: '' state: 0 sent encoded key to child

[333 01:56:47.900791] [PARSE ERROR] The application is trying to use xterm's modifyOtherKeys. This is superseded by the kitty keyboard protocol: https://sw.kovidgoyal.net/kitty/keyboard-protocol/ the application should be updated to use that

[333 01:56:47.900927] [PARSE ERROR] The application is trying to use xterm's modifyOtherKeys. This is superseded by the kitty keyboard protocol: https://sw.kovidgoyal.net/kitty/keyboard-protocol/ the application should be updated to use that

**Note: ** This was accomplished with version 0.26.5 of kitty terminal.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330077897@github.com>

Kovid Goyal

unread,
Nov 29, 2022, 12:03:06 AM11/29/22
to vim/vim, Subscribed

[333 01:56:47.900791] [PARSE ERROR] The application is trying to use xterm's modifyOtherKeys.

This tells us you are using a version of vim without the keyboard patch or that vim is enabling the modifyOtherKeys protocol instead of the kitty keyboard protocol.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330079776@github.com>

icaro-meneses

unread,
Nov 29, 2022, 12:08:13 AM11/29/22
to vim/vim, Subscribed

How can I apply the patch, or prevent Vim from enabling the modifyOtherKeys protocol so that the kitty keyboard protocol is used?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330083154@github.com>

Kovid Goyal

unread,
Nov 29, 2022, 12:30:46 AM11/29/22
to vim/vim, Subscribed

@icaro-meneses That was my mistake, you need

kitty --config=NONE vim -u NONE -c "set nocompatible"

With -u NONE vim doesnt enable the kitty keyboard protocol. set nocompatible is needed for it to do so.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330101414@github.com>

Kovid Goyal

unread,
Nov 29, 2022, 12:33:25 AM11/29/22
to vim/vim, Subscribed

@brammool Here is an issue I have found. ttimeoutlen is still in effect for esc key presses. To reproduce:

kitty --config=NONE vim -u NONE -c "set nocompatible" -c "set ttimeoutlen=100000"

now press i to enter insert mode. Press ctrl-v and then esc to verify that you get ^[[27u indicating the kitty keyboard protocol is in effect. Then press the Esc key you will see that vim hangs because of the large ttimeoutlen value.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330103042@github.com>

Kovid Goyal

unread,
Nov 29, 2022, 12:58:56 AM11/29/22
to vim/vim, Subscribed

@brammool Here is another issue I found. vim is sending the modifyOtherKeys escape codes on exit as well as the escape codes to pop the kitty keyboard protocol state. And it is doing it twice instead of once. You can see this by running up-to-date kitty. kitty will print an error about modifyOtherKeys to its standard error when vim is quit.

This also happens when suspending vim with ctrl-z but it only happens once. That is one modifyOtherKeys escape code and one kitty keyboard escape code. However on exit, it is doing it twice, that is two kitty keybaord escape codes and two modifyOtherKeys escape codes.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330123565@github.com>

Bram Moolenaar

unread,
Nov 29, 2022, 4:14:52 AM11/29/22
to vim/vim, Subscribed

Please do not use this issue to dump all kinds of comments. This issue is about the question why Vim reports "Already at oldest change". This must be caused by receiving escape sequences ending in "u" that Vim does not recognize.

My first suspicion was that perhaps the termresponse feature was missing, but that appears to not be the case.
With the termresponse feature Vim will recognize the special keys and other sequences ending in "u".
I cannot spot a reason why this would not work, more information is needed.

The simplest way to see what Vim is actually getting is using a channel log. Make sure Vim was compiled with the channel feature, then you can use:

vim --clean --log logfile

Then in Vim type some commands, remember what you typed, and do this until you see the "Already at oldest change" message unexpectedly. Then quit Vim and inspect the "logfile". You should be able to find what happened before some lines with "raw terminal output:" for that oldest change message. There should be a "raw key input:" line with the escape sequence that wasn't recognized. Note that input may be split up in pieces.

If it's not directly clear, you can repeat with some keys that work OK (keys without modifiers should always be OK) and find a key that triggers the oldest change message. Hopefully this will give us a hint.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1330316534@github.com>

icaro-meneses

unread,
Nov 29, 2022, 12:25:53 PM11/29/22
to vim/vim, Subscribed

@kovidgoyal

@icaro-meneses That was my mistake, you need

kitty --config=NONE vim -u NONE -c "set nocompatible"

With -u NONE vim doesnt enable the kitty keyboard protocol. set nocompatible is needed for it to do so.

I did the test with the command you suggested, and the problem continues.

@brammool

I made a new compilation of Vim this time adding the +channel feature, and the command vim --version gives me the following:

$ vim --version

                                                                                                                                                                                                 

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Nov 29 2022 14:07:31)

Included patches: 1-965

Compiled by icaro

Huge version with GTK3 GUI.  Features included (+) or not (-):

+acl               +file_in_path      +mouse_urxvt       -tag_any_white

+arabic            +find_in_path      +mouse_xterm       -tcl

+autocmd           +float             +multi_byte        +termguicolors

+autochdir         +folding           +multi_lang        +terminal

-autoservername    -footer            -mzscheme          +terminfo

+balloon_eval      +fork()            +netbeans_intg     +termresponse

+balloon_eval_term +gettext           +num64             +textobjects

+browse            -hangul_input      +packages          +textprop

++builtin_terms    +iconv             +path_extra        +timers

+byte_offset       +insert_expand     +perl              +title

+channel           +ipv6              +persistent_undo   +toolbar

+cindent           +job               +popupwin          +user_commands

+clientserver      +jumplist          +postscript        +vartabs

+clipboard         +keymap            +printer           +vertsplit

+cmdline_compl     +lambda            +profile           +vim9script

+cmdline_hist      +langmap           -python            +viminfo

+cmdline_info      +libcall           +python3           +virtualedit

+comments          +linebreak         +quickfix          +visual

+conceal           +lispindent        +reltime           +visualextra

+cryptv            +listcmds          +rightleft         +vreplace

+cscope            +localmap          +ruby              +wildignore

+cursorbind        -lua               +scrollbind        +wildmenu

+cursorshape       +menu              +signs             +windows

+dialog_con_gui    +mksession         +smartindent       +writebackup

+diff              +modify_fname      +sodium            +X11

+digraphs          +mouse             +sound             -xfontset

+dnd               +mouseshape        +spell             +xim

-ebcdic            +mouse_dec         +startuptime       +xpm

+emacs_tags        +mouse_gpm         +statusline        +xsmp_interact

+eval              -mouse_jsbterm     -sun_workshop      +xterm_clipboard

+ex_extra          +mouse_netterm     +syntax            -xterm_save

+extra_search      +mouse_sgr         +tag_binary        

-farsi             -mouse_sysmouse    -tag_old_static    

   system vimrc file: "$VIM/vimrc"

     user vimrc file: "$HOME/.vimrc"

 2nd user vimrc file: "~/.vim/vimrc"

      user exrc file: "$HOME/.exrc"

  system gvimrc file: "$VIM/gvimrc"

    user gvimrc file: "$HOME/.gvimrc"

2nd user gvimrc file: "~/.vim/gvimrc"

       defaults file: "$VIMRUNTIME/defaults.vim"

    system menu file: "$VIMRUNTIME/menu.vim"

  fall-back for $VIM: "/usr/local/share/vim"

Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -pthread -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 

Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.36/core_perl/CORE -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lelf -lcanberra -lsodium -lacl -lattr -lgpm -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.36/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto -fstack-protector-strong -L/usr/local/lib -L/usr/lib/perl5/5.36/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc -L/usr/lib/python3.10/config-3.10-x86_64-linux-gnu -lpython3.10 -lcrypt -ldl -lm -lm -lruby -lm -L/usr/lib 

And here is the log file as you suggested.

==== start log session Tue Nov 29 14:17:32 2022 ====

  0.016739 : raw terminal output: "�[?1000h"

  0.016819 : raw terminal output: "�[?1049h�[>1u�[?u�[>c�[?1h�=�[?2004h�[?1004h"

  0.016848 : raw terminal output: "�[1;58r�[?12h�[?12l�[22;2t"

  0.016863 : raw terminal output: "�[22;1t"

  0.017210 : raw terminal output: "�[27m�[23m�[29m�[m�[H�[2J�[2;1H▽�[6n"

  0.017222 : raw terminal output: "�[2;1H  �[3;1H�Pzz�\�[0%m�[6n"

  0.017227 : raw terminal output: "�[3;1H           �[1;1H"

  0.017254 : raw terminal output: "�[>c"

  0.017272 : raw terminal output: "�]10;?��]11;?�"

  0.017318 : SafeState: Start triggering

  0.017564 : setting timeout timer to 2 sec 0 nsec

  0.017651 : raw terminal output: "�[?25l�[2;1H�[94m~                                                                                                         �[3;1H~                                                                                                         �[4;1H~                                                                                                         �[5;1H~                                                                                                         �[6;1H~                                                                                                         �[7;1H~                                                                                                         �[8;1H~                                                                                                         �[9;1H~                                                                                                         �[10;1H~                                                                                                         �[11;1H~                                                                                                         �[12;1H~                                                                                                         �[13;1H~                                                                                                         �[14;1H~                                                                                                         �[15;1H~                                                                                                         �[16;1H~                                                                                                         �[17;1H~                                                                                                         �[18;1H~                                                                                                         �[19;1H~                                                                                                         "

  0.017706 : raw terminal output: "�[20;1H~                                                                                                         �[21;1H~                                                                                                         �[22;1H~                                                                                                         �[23;1H~                                                                                                         �[24;1H~                                                                                                         �[25;1H~                                                                                                         �[26;1H~                                                                                                         �[27;1H~                                                                                                         �[28;1H~                                                                                                         �[29;1H~                                                                                                         �[30;1H~                                                                                                         �[31;1H~                                                                                                         �[32;1H~                                                                                                         �[33;1H~                                                                                                         �[34;1H~                                                                                                         �[35;1H~                                                                                                         �[36;1H~                                                                                                         �[37;1H~                                                                                                         "

  0.017772 : raw terminal output: "�[38;1H~                                                                                                         �[39;1H~                                                                                                         �[40;1H~                                                                                                         �[41;1H~                                                                                                         �[42;1H~                                                                                                         �[43;1H~                                                                                                         �[44;1H~                                                                                                         �[45;1H~                                                                                                         �[46;1H~                                                                                                         �[47;1H~                                                                                                         �[48;1H~                                                                                                         �[49;1H~                                                                                                         �[50;1H~                                                                                                         �[51;1H~                                                                                                         �[52;1H~                                                                                                         �[53;1H~                                                                                                         �[54;1H~                                                                                                         �[55;1H~                                                                                                         "

  0.018208 : raw terminal output: "�[56;1H~                                                                                                         �[57;1H~                                                                                                         �[m�[58;89H0,0-1�[9CAll�[24;45HVIM - Vi IMproved�[26;46Hversion 9.0.965�[27;42Hby Bram Moolenaar et al.�[28;32HVim is open source and freely distributable�[30;39HBecome a registered Vim user!�[31;31Htype  :help register�[34m<Enter>�[m   for information �[33;31Htype  :q�[34m<Enter>�[m               to exit         �[34;31Htype  :help�[34m<Enter>�[m  or  �[34m<F1>�[m  for on-line help�[35;31Htype  :help version9�[34m<Enter>�[m   for version info�]2;[No Name] - VIM�"

  0.018278 : raw terminal output: "�]1;[No Name]�"

  0.018302 : raw terminal output: "�[1;1H�[?25h"

  0.018311 : looking for messages on channels

  0.018315 : SafeState: back to waiting, triggering SafeStateAgain

  0.020707 : raw key input: "�[?1u�[>1;4000;26c�[2;2R�[3;1R�[>1;4000;26c�]10;rgb:dddd/dddd/dddd�\�]11;rgb:0000/0000/0000�\"

  0.020833 : raw terminal output: "�P+q436f�\�P+q6b75�\�P+q6b64�\�P+q6b72�\�P+q6b6c�\�P+q2332�\�P+q2334�\�P+q2569�\�P+q2a37�\�P+q6b31�\"

  0.020897 : raw terminal output: "�[?1000l�[?1006h�[?1002h�[?1006l�[?1002l�[?1006h�[?1002h�P+q436f�\�P+q6b75�\�P+q6b64�\�P+q6b72�\�P+q6b6c�\�P+q2332�\�P+q2334�\�P+q2569�\�P+q2a37�\�P+q6b31�\"

  0.020918 : raw terminal output: "�P$q q�\�[?12$p"

  0.020958 : raw terminal output: "�[?25l�[58;79H^[�[1;1H�[58;81H]�[1;1H"

  0.020966 : looking for messages on channels

  0.020969 : SafeState: back to waiting, triggering SafeStateAgain

  0.022177 : setting timeout timer to 2 sec 0 nsec

  0.022261 : raw terminal output: "�[58;79H   �[1;1H�[27m�[23m�[29m�[m�[H�[2J�[2;1H�[94m~                                                                                                         �[3;1H~                                                                                                         �[4;1H~                                                                                                         �[5;1H~                                                                                                         �[6;1H~                                                                                                         �[7;1H~                                                                                                         �[8;1H~                                                                                                         �[9;1H~                                                                                                         �[10;1H~                                                                                                         �[11;1H~                                                                                                         �[12;1H~                                                                                                         �[13;1H~                                                                                                         �[14;1H~                                                                                                         �[15;1H~                                                                                                         �[16;1H~                                                                                                         �[17;1H~                                                                                                         �[18;1H~                                                                                                         �[19;1H~                                                                               "

  0.022316 : raw terminal output: "                          �[20;1H~                                                                                                         �[21;1H~                                                                                                         �[22;1H~                                                                                                         �[23;1H~                                                                                                         �[24;1H~                                                                                                         �[25;1H~                                                                                                         �[26;1H~                                                                                                         �[27;1H~                                                                                                         �[28;1H~                                                                                                         �[29;1H~                                                                                                         �[30;1H~                                                                                                         �[31;1H~                                                                                                         �[32;1H~                                                                                                         �[33;1H~                                                                                                         �[34;1H~                                                                                                         �[35;1H~                                                                                                         �[36;1H~                                                                                                         �[37;1H~                                                                                            "

  0.022375 : raw terminal output: "             �[38;1H~                                                                                                         �[39;1H~                                                                                                         �[40;1H~                                                                                                         �[41;1H~                                                                                                         �[42;1H~                                                                                                         �[43;1H~                                                                                                         �[44;1H~                                                                                                         �[45;1H~                                                                                                         �[46;1H~                                                                                                         �[47;1H~                                                                                                         �[48;1H~                                                                                                         �[49;1H~                                                                                                         �[50;1H~                                                                                                         �[51;1H~                                                                                                         �[52;1H~                                                                                                         �[53;1H~                                                                                                         �[54;1H~                                                                                                         �[55;1H~                                                                                                         "

  0.022450 : raw terminal output: "�[56;1H~                                                                                                         �[57;1H~                                                                                                         �[m�[58;89H0,0-1�[9CAll�[24;45HVIM - Vi IMproved�[26;46Hversion 9.0.965�[27;42Hby Bram Moolenaar et al.�[28;32HVim is open source and freely distributable�[30;39HBecome a registered Vim user!�[31;31Htype  :help register�[38;5;81m<Enter>�[m   for information �[33;31Htype  :q�[38;5;81m<Enter>�[m               to exit         �[34;31Htype  :help�[38;5;81m<Enter>�[m  or  �[38;5;81m<F1>�[m  for on-line help�[35;31Htype  :help version9�[38;5;81m<Enter>�[m   for version info�[1;1H�[?25h"

  0.022457 : looking for messages on channels

  0.022460 : SafeState: back to waiting, triggering SafeStateAgain

  0.024555 : raw key input: "�P1+r436f=323536�\�P1+r6b75=1b4f41�\�P1+r6b64=1b4f42�\�P1+r6b72=1b4f43�\�P1+r6b6c=1b4f44�\�P1+r2332=1b5b313b3248�\�P1+r2334=1b5b313b3244�\�P1+r2569=1b5b313b3243�\�P1+r2a37=1b5b313b3246�\�P1+r6b31=1b4f50�\�P1+r436f=323536�\�P1+r6b75=1b4f41�\�P1+r6b64=1b4f42�\�P1+r6b72=1b4f43�\�P1+r6b6c=1b4f44�\�P1+r2332=1b5b313b3248�\�P1+r2334=1b5b313b3244�\�P1+r2569=1b5b313b3243�\�P1+r2a37=1b5b313b3246�\�P1+r6b31=1b4f50�\�P1$r1 q�\�[?12;0$y"

  0.024670 : raw terminal output: "�P+q6b32�\"

  0.024692 : raw terminal output: "�P+q6b33�\"

  0.024706 : raw terminal output: "�P+q6b34�\"

  0.024734 : raw terminal output: "�[?25l�[58;79H^[�[1;1H�[58;81HP�[1;1H�[58;82H1�[1;1H�[58;83H+�[1;1H�[58;84Hr�[1;1H�[58;85H6�[1;1H�[58;86Hb�[1;1H�[58;87H7�[1;1H�[58;88H2�[1;1H"

  0.024770 : looking for messages on channels

  0.024775 : SafeState: back to waiting, triggering SafeStateAgain

  0.024799 : raw terminal output: "�[58;79H          �[1;1H�P+q6b35�\"

  0.024814 : raw terminal output: "�P+q6b36�\"

  0.024826 : raw terminal output: "�P+q6b37�\"

  0.024849 : raw terminal output: "�[58;79H3�[1;1H�[58;80H4�[1;1H�[58;81H=�[1;1H�[58;82H1�[1;1H�[58;83Hb�[1;1H�[58;84H5�[1;1H�[58;85Hb�[1;1H�[58;86H3�[1;1H�[58;87H1�[1;1H�[58;88H3�[1;1H"

  0.024854 : looking for messages on channels

  0.024856 : SafeState: back to waiting, triggering SafeStateAgain

  0.024872 : raw terminal output: "�[58;79H          �[1;1H�P+q6b38�\"

  0.024888 : raw terminal output: "�P+q6b39�\"

  0.024910 : raw terminal output: "�[58;79Hr�[1;1H�[58;80H2�[1;1H�[58;81Ha�[1;1H�[58;82H3�[1;1H�[58;83H7�[1;1H�[58;84H=�[1;1H�[58;85H1�[1;1H�[58;86Hb�[1;1H�[58;87H5�[1;1H�[58;88Hb�[1;1H"

  0.024914 : looking for messages on channels

  0.024917 : SafeState: back to waiting, triggering SafeStateAgain

  0.024933 : raw terminal output: "�[58;79H          �[1;1H�P+q6b3b�\"

  0.024947 : raw terminal output: "�P+q4631�\"

  0.024978 : raw terminal output: "�[58;79H1�[1;1H�[58;80H+�[1;1H�[58;81Hr�[1;1H�[58;82H6�[1;1H�[58;83Hb�[1;1H�[58;84H7�[1;1H�[58;85H5�[1;1H�[58;86H=�[1;1H�[58;87H1�[1;1H�[58;88Hb�[1;1H"

  0.024983 : looking for messages on channels

  0.024985 : SafeState: back to waiting, triggering SafeStateAgain

  0.025028 : raw terminal output: "�[58;79H          �[1;1H�[58;79H^[�[1;1H"

  0.025033 : looking for messages on channels

  0.025036 : SafeState: back to waiting, triggering SafeStateAgain

  0.025078 : raw terminal output: "�[58;79H  �[1;1H�[58;79H9�[1;1H�[58;80H=�[1;1H�[58;81H1�[1;1H�[58;82Hb�[1;1H�[58;83H5�[1;1H�[58;84Hb�[1;1H�[58;85H3�[1;1H�[58;86H1�[1;1H�[58;87H3�[1;1H�[58;88Hb�[1;1H"

  0.025083 : looking for messages on channels

  0.025085 : SafeState: back to waiting, triggering SafeStateAgain

  0.025142 : raw terminal output: "�[58;79H          �[1;1H�[58;79H^[�[1;1H�[58;81H[�[1;1H�[58;82H?�[1;1H�[58;83H1�[1;1H�[58;84H2�[1;1H�[58;85H;�[1;1H�[58;86H0�[1;1H"

  0.025147 : looking for messages on channels

  0.025151 : SafeState: back to waiting, triggering SafeStateAgain

  0.025173 : raw terminal output: "�[58;79H        �[1;1H�[?25h"

  0.025178 : looking for messages on channels

  0.025180 : SafeState: back to waiting, triggering SafeStateAgain

  0.030871 : raw key input: "�P1+r6b32=1b4f51�\�P1+r6b33=1b4f52�\�P1+r6b34=1b4f53�\�P1+r6b35=1b5b31357e�\�P1+r6b36=1b5b31377e�\�P1+r6b37=1b5b31387e�\�P1+r6b38=1b5b31397e�\�P1+r6b39=1b5b32307e�\�P1+r6b3b=1b5b32317e�\�P1+r4631=1b5b32337e�\"

  0.030984 : raw terminal output: "�P+q4632�\"

  0.031018 : raw terminal output: "�P+q2531�\"

  0.031032 : raw terminal output: "�P+q2638�\"

  0.031084 : raw terminal output: "�[?25l�[58;79HP�[1;1H�[58;80H1�[1;1H�[58;81H+�[1;1H�[58;82Hr�[1;1H�[58;83H6�[1;1H�[58;84Hb�[1;1H�[58;85H3�[1;1H�[58;86H5�[1;1H�[58;87H=�[1;1H�[58;88H1�[1;1H"

  0.031096 : looking for messages on channels

  0.031115 : SafeState: back to waiting, triggering SafeStateAgain

  0.031133 : raw terminal output: "�[58;79H          �[1;1H�P+q6b62�\"

  0.031159 : raw terminal output: "�P+q6b49�\"

  0.031188 : raw terminal output: "�P+q6b44�\"

  0.031212 : raw terminal output: "�[58;79H1�[1;1H�[58;80H+�[1;1H�[58;81Hr�[1;1H�[58;82H6�[1;1H�[58;83Hb�[1;1H�[58;84H3�[1;1H�[58;85H8�[1;1H�[58;86H=�[1;1H�[58;87H1�[1;1H�[58;88Hb�[1;1H"

  0.031217 : looking for messages on channels

  0.031219 : SafeState: back to waiting, triggering SafeStateAgain

  0.031235 : raw terminal output: "�[58;79H          �[1;1H�P+q6b68�\"

  0.031248 : raw terminal output: "�P+q4037�\"

  0.031261 : raw terminal output: "�P+q6b50�\"

  0.031284 : raw terminal output: "�[58;79H+�[1;1H�[58;80Hr�[1;1H�[58;81H4�[1;1H�[58;82H6�[1;1H�[58;83H3�[1;1H�[58;84H1�[1;1H�[58;85H=�[1;1H�[58;86H1�[1;1H�[58;87Hb�[1;1H�[58;88H5�[1;1H"

  0.031289 : looking for messages on channels

  0.031292 : SafeState: back to waiting, triggering SafeStateAgain

  0.031306 : raw terminal output: "�[58;79H          �[1;1H�P+q6b4e�\"

  0.031344 : raw terminal output: "�[?25h"

  0.031363 : looking for messages on channels

  0.031365 : SafeState: back to waiting, triggering SafeStateAgain

  0.043385 : raw key input: "�P1+r4632=1b5b32347e�\�P1+r2531=�\�P1+r2638=�\�P1+r6b62=7f�\�P1+r6b49=1b5b327e�\�P1+r6b44=1b5b337e�\�P1+r6b68=1b4f48�\�P1+r4037=1b4f46�\�P1+r6b50=1b5b357e�\�P1+r6b4e=1b5b367e�\"

  0.043495 : raw terminal output: "�P+q4b31�\"

  0.043516 : raw terminal output: "�P+q4b33�\"

  0.043529 : raw terminal output: "�P+q4b34�\"

  0.043541 : raw terminal output: "�P+q4b35�\"

  0.043581 : raw terminal output: "�[?25l�[58;79H^[�[1;1H�[58;81HP�[1;1H�[58;82H1�[1;1H�[58;83H+�[1;1H"

  0.043592 : looking for messages on channels

  0.043596 : SafeState: back to waiting, triggering SafeStateAgain

  0.043621 : raw terminal output: "�[58;79H     �[1;1H�P+q6b42�\"

  0.043661 : raw terminal output: "�[58;79HP�[1;1H�[58;80H1�[1;1H�[58;81H+�[1;1H�[58;82Hr�[1;1H�[58;83H4�[1;1H�[58;84H0�[1;1H�[58;85H3�[1;1H�[58;86H7�[1;1H�[58;87H=�[1;1H�[58;88H1�[1;1H"

  0.043666 : looking for messages on channels

  0.043669 : SafeState: back to waiting, triggering SafeStateAgain

  0.043705 : raw terminal output: "�[58;79H          �[1;1H�[?25h"

  0.043710 : looking for messages on channels

  0.043713 : SafeState: back to waiting, triggering SafeStateAgain

  0.061266 : raw key input: "�P1+r4b31=�\�P1+r4b33=�\�P1+r4b34=�\�P1+r4b35=�\�P1+r6b42=1b5b5a�\"

  0.061578 : raw terminal output: "�[?25l�[58;79H^[�[1;1H�[58;81HP�[1;1H�[58;82H1�[1;1H�[58;83H+�[1;1H"

  0.061602 : looking for messages on channels

  0.061612 : SafeState: back to waiting, triggering SafeStateAgain

  0.061669 : raw terminal output: "�[58;79H     �[1;1H�[?25h"

  0.061675 : looking for messages on channels

  0.061677 : SafeState: back to waiting, triggering SafeStateAgain

  1.900109 : raw key input: ":"

  1.900159 : SafeState: reset: key typed

  1.900199 : raw terminal output: "�[?25l�[58;79H:�[1;1H"

  1.900221 : SafeState: Start triggering

  1.900235 : raw terminal output: "�[58;79H�[K�[58;1H:�[?25h"

  1.900241 : looking for messages on channels

  1.900244 : SafeState: back to waiting, triggering SafeStateAgain

  4.668088 : raw key input: "h"

  4.668134 : SafeState: reset: key typed

  4.668152 : SafeState: Start triggering

  4.668167 : raw terminal output: "h"

  4.668174 : looking for messages on channels

  4.668178 : SafeState: back to waiting, triggering SafeStateAgain

  5.419986 : raw key input: "e"

  5.420044 : SafeState: reset: key typed

  5.420427 : SafeState: Start triggering

  5.420493 : raw terminal output: "e"

  5.420504 : looking for messages on channels

  5.420510 : SafeState: back to waiting, triggering SafeStateAgain

  5.796138 : raw key input: "l"

  5.796209 : SafeState: reset: key typed

  5.796237 : SafeState: Start triggering

  5.796261 : raw terminal output: "l"

  5.796274 : looking for messages on channels

  5.796280 : SafeState: back to waiting, triggering SafeStateAgain

  6.195880 : raw key input: "p"

  6.195945 : SafeState: reset: key typed

  6.195972 : SafeState: Start triggering

  6.195998 : raw terminal output: "p"

  6.196011 : looking for messages on channels

  6.196017 : SafeState: back to waiting, triggering SafeStateAgain

  7.379898 : raw key input: " "

  7.379982 : SafeState: reset: key typed

  7.380013 : SafeState: Start triggering

  7.380046 : raw terminal output: " "

  7.380061 : looking for messages on channels

  7.380068 : SafeState: back to waiting, triggering SafeStateAgain

  8.803983 : raw key input: "s"

  8.804067 : SafeState: reset: key typed

  8.804101 : SafeState: Start triggering

  8.804136 : raw terminal output: "s"

  8.804151 : looking for messages on channels

  8.804158 : SafeState: back to waiting, triggering SafeStateAgain

  9.147116 : raw key input: "p"

  9.147155 : SafeState: reset: key typed

  9.147174 : SafeState: Start triggering

  9.147185 : raw terminal output: "p"

  9.147192 : looking for messages on channels

  9.147195 : SafeState: back to waiting, triggering SafeStateAgain

  9.491863 : raw key input: "l"

  9.491992 : SafeState: reset: key typed

  9.492066 : SafeState: Start triggering

  9.492116 : raw terminal output: "l"

  9.492137 : looking for messages on channels

  9.492147 : SafeState: back to waiting, triggering SafeStateAgain

  9.835966 : raw key input: "i"

  9.836070 : SafeState: reset: key typed

  9.836114 : SafeState: Start triggering

  9.836159 : raw terminal output: "i"

  9.836179 : looking for messages on channels

  9.836189 : SafeState: back to waiting, triggering SafeStateAgain

 10.147209 : raw key input: "t"

 10.147254 : SafeState: reset: key typed

 10.147273 : SafeState: Start triggering

 10.147287 : raw terminal output: "t"

 10.147295 : looking for messages on channels

 10.147299 : SafeState: back to waiting, triggering SafeStateAgain

 12.427869 : raw key input: "�[13;129u"

 12.427981 : SafeState: reset: key typed

 12.428066 : raw terminal output: "�[?25l�[58;1H�[K"

 12.428533 : raw terminal output: "�[1;1H�[58;89H0,0-1�[9CAll�[1;1H�[?25h��[?25l�[58;79H129u�[1;1H"

 12.428591 : raw terminal output: "�[58;1HAlready at oldest change�[58;79H�[K"

 12.428608 : SafeState: Start triggering

 12.428709 : raw terminal output: "�[1;1H�[58;89H0,0-1�[9CAll�[1;1H�[?25h"

 12.428788 : looking for messages on channels

 12.428799 : SafeState: back to waiting, triggering SafeStateAgain

 16.867883 : raw key input: ":"

 16.867994 : SafeState: reset: key typed

 16.868094 : raw terminal output: "�[?25l�[58;79H:�[1;1H"

 16.868135 : SafeState: Start triggering

 16.868177 : raw terminal output: "�[58;1H�[K�[58;1H:�[?25h"

 16.868194 : looking for messages on channels

 16.868203 : SafeState: back to waiting, triggering SafeStateAgain

 18.395807 : raw key input: "e"

 18.395908 : SafeState: reset: key typed

 18.395947 : SafeState: Start triggering

 18.396053 : raw terminal output: "e"

 18.396078 : looking for messages on channels

 18.396088 : SafeState: back to waiting, triggering SafeStateAgain

 19.427729 : raw key input: " "

 19.427831 : SafeState: reset: key typed

 19.427870 : SafeState: Start triggering

 19.427913 : raw terminal output: " "

 19.427933 : looking for messages on channels

 19.427943 : SafeState: back to waiting, triggering SafeStateAgain

 21.595732 : raw key input: "m"

 21.595837 : SafeState: reset: key typed

 21.595878 : SafeState: Start triggering

 21.595923 : raw terminal output: "m"

 21.595944 : looking for messages on channels

 21.595954 : SafeState: back to waiting, triggering SafeStateAgain

 22.027712 : raw key input: "y"

 22.027822 : SafeState: reset: key typed

 22.028182 : SafeState: Start triggering

 22.028259 : raw terminal output: "y"

 22.028282 : looking for messages on channels

 22.028294 : SafeState: back to waiting, triggering SafeStateAgain

 22.587603 : raw key input: "f"

 22.587704 : SafeState: reset: key typed

 22.587744 : SafeState: Start triggering

 22.587787 : raw terminal output: "f"

 22.587807 : looking for messages on channels

 22.587818 : SafeState: back to waiting, triggering SafeStateAgain

 22.971679 : raw key input: "i"

 22.971781 : SafeState: reset: key typed

 22.971821 : SafeState: Start triggering

 22.971866 : raw terminal output: "i"

 22.971888 : looking for messages on channels

 22.971898 : SafeState: back to waiting, triggering SafeStateAgain

 23.339734 : raw key input: "l"

 23.339833 : SafeState: reset: key typed

 23.339877 : SafeState: Start triggering

 23.339921 : raw terminal output: "l"

 23.339942 : looking for messages on channels

 23.339953 : SafeState: back to waiting, triggering SafeStateAgain

 23.707697 : raw key input: "e"

 23.707805 : SafeState: reset: key typed

 23.707848 : SafeState: Start triggering

 23.707892 : raw terminal output: "e"

 23.707913 : looking for messages on channels

 23.707923 : SafeState: back to waiting, triggering SafeStateAgain

 24.227619 : raw key input: "."

 24.227723 : SafeState: reset: key typed

 24.227764 : SafeState: Start triggering

 24.227810 : raw terminal output: "."

 24.227832 : looking for messages on channels

 24.227842 : SafeState: back to waiting, triggering SafeStateAgain

 24.835742 : raw key input: "t"

 24.835847 : SafeState: reset: key typed

 24.835915 : SafeState: Start triggering

 24.835964 : raw terminal output: "t"

 24.835985 : looking for messages on channels

 24.835995 : SafeState: back to waiting, triggering SafeStateAgain

 25.235592 : raw key input: "x"

 25.235693 : SafeState: reset: key typed

 25.235737 : SafeState: Start triggering

 25.235782 : raw terminal output: "x"

 25.235804 : looking for messages on channels

 25.235814 : SafeState: back to waiting, triggering SafeStateAgain

 25.619721 : raw key input: "t"

 25.619825 : SafeState: reset: key typed

 25.619868 : SafeState: Start triggering

 25.619911 : raw terminal output: "t"

 25.619932 : looking for messages on channels

 25.619942 : SafeState: back to waiting, triggering SafeStateAgain

 27.170968 : raw key input: "�[13;129u"

 27.171020 : SafeState: reset: key typed

 27.171228 : raw terminal output: "�[?25l�[58;1H�[K"

 27.171379 : raw terminal output: "�[1;1H�[58;89H0,0-1�[9CAll�[1;1H�[?25h��[?25l�[58;79H129u�[1;1H"

 27.171397 : raw terminal output: "�[58;1HAlready at oldest change�[58;79H�[K"

 27.171402 : SafeState: Start triggering

 27.171420 : raw terminal output: "�[1;1H�[58;89H0,0-1�[9CAll�[1;1H�[?25h"

 27.171426 : looking for messages on channels

 27.171430 : SafeState: back to waiting, triggering SafeStateAgain

 33.923587 : raw key input: "�[99;133u"

 33.923712 : SafeState: reset: key typed

 33.924161 : raw terminal output: "��[?25l�[58;79H133u�[1;1H"

 33.924222 : raw terminal output: "�[58;79H�[K"

 33.924239 : SafeState: Start triggering

 33.924313 : raw terminal output: "�[1;1H�[58;89H0,0-1�[9CAll�[1;1H�[?25h"

 33.924333 : looking for messages on channels

 33.924343 : SafeState: back to waiting, triggering SafeStateAgain

 35.339868 : raw key input: "�[O"

 35.340011 : looking for messages on channels

 35.340026 : SafeState: back to waiting, triggering SafeStateAgain

 36.429260 : raw terminal output: "�[?25h"

 36.429319 : raw terminal output: "�[58;1H�[?1004l�[?2004l�[?1l�>"

 36.429327 : raw terminal output: "�[>4;m�[<u�[?1049l"

 36.429333 : raw terminal output: "Vim: Caught deadly signal HUP

"

 36.429342 : Exiting...

 36.429382 : raw terminal output: "Vim: Finished.

�[58;1H�]2;vim�"

 36.429390 : raw terminal output: "�]1;vim�"

 36.429396 : raw terminal output: "�[23;2t"

 36.429402 : raw terminal output: "�[23;1t"

 36.429408 : raw terminal output: "�[22;2t"

 36.429414 : raw terminal output: "�[22;1t"

 36.429420 : raw terminal output: "�[23;2t"

 36.429426 : raw terminal output: "�[23;1t"


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1331015425@github.com>

icaro-meneses

unread,
Nov 29, 2022, 12:29:19 PM11/29/22
to vim/vim, Subscribed

Since the display of characters here on GitHub looks weird, here's the file vim-log.txt:
vim-log.txt

Note: The commands I entered were :help split, :e myfile.txt and :q, all of which returned "Already at oldest change".


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1331019880@github.com>

icaro-meneses

unread,
Nov 29, 2022, 12:44:45 PM11/29/22
to vim/vim, Subscribed

With another test, I did the following actions:

  1. I entered insert mode with the i key
  2. I typed hello world
  3. I pressed ENTER and vim ended up deleting the line and returned 1 line less; before #1 3 seconds ago
  4. I entered insert mode again with the i key
  5. I typed github.com
  6. I pressed ENTER and vim ended up deleting the line and returned 1 line less; before #1 3 seconds ago
  7. I typed the command to save :w and vim returned Already at oldest change
  8. I typed the command to exit :q and vim returned Already at oldest change

Here is the log file for this test:
vim-log-v2.txt


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1331039099@github.com>

Bram Moolenaar

unread,
Nov 29, 2022, 1:18:07 PM11/29/22
to vim/vim, Subscribed


> @brammool
>
> I made a new compilation of Vim this time adding the +channel feature,
> and the command `vim --version` gives me the following:

[...]


> And here is the log file as you suggested.

Thanks, this reveals the problem. In the log I can see:


> 10.147254 : SafeState: reset: key typed
> 10.147273 : SafeState: Start triggering
> 10.147287 : raw terminal output: "t"

Up to here it appears you typed "help split".


> 10.147295 : looking for messages on channels
> 10.147299 : SafeState: back to waiting, triggering SafeStateAgain
> 12.427869 : raw key input: " [13;129u"
> 12.427981 : SafeState: reset: key typed

This must be the Enter key, which sends decimal 13. But somehow
suddenly the modifier is 129. That is for the num_lock key. Apparently
Kitty ignores num_lock for most keys but does add it here, quite
unexpected.

Vim doesn't support this modifier. The code as it is now therefore does
not decode the escape sequence, which leads to using it as separate
characters, and the "u" then causes:


> 12.428066 : raw terminal output: " [?25l [58;1H [K"
> 12.428533 : raw terminal output: " [1;1H [58;89H0,0-1 [9CAll [1;1H [?25h [?25l [58;79H129u [1;1H"
> 12.428591 : raw terminal output: " [58;1HAlready at oldest change [58;79H [K"

I could argue that using the num_lock modifier for the Enter key doesn't
make sense, but since terminals exist that do this we'll have to deal
with it. Dropping unknown modifiers on the floor is much better than
not recognizing the key code.

--
If Microsoft would build a car...
... You'd have to press the "Start" button to turn the engine off.

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1331098787@github.com>

Bram Moolenaar

unread,
Nov 29, 2022, 1:33:24 PM11/29/22
to vim/vim, Subscribed

Closed #11638 as completed via 064fd67.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/11638/issue_event/7915360241@github.com>

icaro-meneses

unread,
Nov 29, 2022, 1:48:35 PM11/29/22
to vim/vim, Subscribed

@brammool

I could argue that using the num_lock modifier for the Enter key doesn't
make sense, but since terminals exist that do this we'll have to deal
with it. Dropping unknown modifiers on the floor is much better than
not recognizing the key code.

With what you said, I did a new test and I noticed this: with the NUM_LOCK of my keyboard disabled, the problem we are trying to solve (Already at oldest change) does not happen. If I enable NUM_LOCK then the problem reoccurs.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1331132654@github.com>

icaro-meneses

unread,
Nov 29, 2022, 2:03:52 PM11/29/22
to vim/vim, Subscribed

I did the installation of the 064fd67 commit version and with that I verified that the problem was solved.

Thank you gentlemen for your patience and support. I hope I also contributed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1331155497@github.com>

Shane-XB-Qian

unread,
Dec 1, 2022, 8:34:51 PM12/1/22
to vim/vim, Subscribed

that ^[[?1u^[[>1;4000;21c perhaps not from kitty, but perhaps should ate it if not recognized it. // interesting thing is when i use kitty with gnu-screen, then such escape code looks ate by gnu-screen. :-)

update: this one looks now is fixed. FYI.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11638/1334654698@github.com>

Reply all
Reply to author
Forward
0 new messages