[Bug]: Strange behavior of neovim after update
Problem description
Hi there,
I just updated Neovim to version 10 today. After the update, I noticed that a 3m message is displayed for a moment when I open it. I even tried it in --clean mode and the result is the same!
Is this a bug? Or does it have a meaning?
I tested Neovim version 10 on Linux Debian 12 and this message is not displayed!
Thanks
https://github.com/termux/termux-packages/assets/95992420/8a5a2816-b698-4226-b733-30114226e8f4
What steps will reproduce the bug?
Neovim update to version 10 nvim
What is the expected behavior?
No response
System information
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=7190
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
arm
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main stable main
# root-repo (sources.list.d/root.list)
deb https://packages.termux.dev/apt/termux-root root stable
Updatable packages:
All packages up to date
termux-tools version:
1.42.4
Android version:
9
Kernel build information:
Linux localhost 3.4.113 #1 SMP PREEMPT Tue Oct 25 18:29:07 UTC 2022 armv7l Android
Device manufacturer:
samsung
Device model:
SM-G7102
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
This looks like an issue in termux-app. I have tried to open neovim in two other ways - 1. ssh into termux Android from Linux desktop 2. open terminal in xfce4 in termux-x11. In both cases, neovim does not show that '3m' characters.
This looks like an issue in termux-app. I have tried to open neovim in two other ways - 1. ssh into termux Android from Linux desktop 2. open terminal in xfce4 in termux-x11. In both cases, neovim does not show that '3m' characters.
How interesting...I didn't know that the sshd capability was available by default. I did some research and found out about it now...thanks for pointing it out!
I've been using Userland and Termius to connect to Termux via ssh, and I'm still getting the same result!!
https://github.com/termux/termux-packages/assets/95992420/29d5c7d2-d430-4904-afc2-dfac5d2c686d
https://github.com/termux/termux-packages/assets/95992420/b269c8c9-788f-40fe-b2ca-95082f230f8e
Update to at least v0.118.1 and then check.
https://github.com/termux/termux-app/releases
At a first glance this looks like escape sequence corruption. But I'm unable to replicate the problem.
I need to get groceries first but I'll have a look into this after.
I've been using Userland and Termius to connect to Termux via ssh
In my previous comment, I meant to use ssh from desktop to phone so that termux app is not used to show neovim.
Update to at least
v0.118.1and then check.
I am using CI artifact from latest commit of master branch in termux-app repository. Is that newer than 0.118.1 release?
Yes, it's latest but terminal issues fixed should be same in both.
It's more likely an issue with neovim escape sequence though as suggested above too.
Update to at least
v0.118.1and then check.https://github.com/termux/termux-app/releases
Thanks for the suggestion...I updated and the problem is still there.
https://github.com/termux/termux-packages/assets/95992420/723680fc-7fe8-40ae-819a-d3e6917f3b30
Since it exists in both 0.118.0 and 0.118.1, and it didn't exist in older neovim versions, then it likely is a neovim issue and not a Termux terminal one.
I am still completely unable to replicate the issue.
@Vanillma you said it happens with nvim --clean as well?
From this looks of it this could be related to
- neovim/neovim#9089
Did a bit more digging, it looks like this is related to the guicursor option.
@Vanillma can you run :set guicursor? in neovim please to show the settings you are using for it.
guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20 seems to be the default.
And is working correctly for me.
I am still completely unable to replicate the issue. @Vanillma you said it happens with
nvim --cleanas well?
Yes, I think it can be seen in the clips I posted.
Did a bit more digging, it looks like this is related to the
guicursoroption.@Vanillma can you run
:set guicursor?in neovim please to show the settings you are using for it.
guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20seems to be the default. And is working correctly for me.
This is my default setting:
guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20
I also tested this option and again the result is the same
set guicursor= in nvimrc OR
vim.cmd("set guicursor=") in init.lua
Issue 20617 This also happened to me when I was opening init.lua And I acted according to the solution that was there and the error problem when opening is init.lua is fixed... but that 3m message is still there for me!
It's weird if this is just happening to me...In any case, I will try to do more tests...thanks
Yep currently working on
- #20617
Needed a pretty substantial rewrite of the libtreesitter build to make sure we're building the parsers we need for neovim.
I'm sorry, I wanted to link to problem number 20617 and say that I realized that I have that problem too!!...When I searched on Google, it suggested that I do it using #...I think it tagged there as my problem now😬
libtreesitter PR is now open as:
- #20630
Superseded by:
- #20635
I just updated Neovim to version 10 today. After the update, I noticed that a 3m message is displayed for a moment when I open it. I even tried it in --clean mode and the result is the same!
Are you using alpine ? because i have seen it only happen inside alpine proot-distro.
Edit: never mind it is really happening now in termux's nvim ( i couldn't notice it before because i was using tmux and seems like TERM variable can affect it ).
I just updated Neovim to version 10 today. After the update, I noticed that a 3m message is displayed for a moment when I open it. I even tried it in --clean mode and the result is the same!
Are you using alpine ? because i have seen it only happen inside alpine proot-distro.
Edit: never mind it is really happening now in termux's nvim ( i couldn't notice it before because i was using tmux and seems like TERM variable can affect it ).
No, I'm not using Alpine.
Anyway, it's not a big problem...I can still use Neovim...I don't know if I should close this issue or leave it open!
Let's leave it open, since issue occurs in termux but not for example xfce terminal there might be some sequence that the app does not handle correctly
I just updated Neovim to version 10 today. After the update, I noticed that a 3m message is displayed for a moment when I open it.
I think this might be coming from <ESC>[4:3m, which is a (relatively) newer escape code to show curly underlines - from https://sw.kovidgoyal.net/kitty/underlines/:
<ESC>[4:0m # no underline
<ESC>[4:1m # straight underline
<ESC>[4:2m # double underline
<ESC>[4:3m # curly underline
<ESC>[4:4m # dotted underline
<ESC>[4:5m # dashed underline
The Termux app terminal currently does not handle the : separator for CSI sub parameters, so printf "\e[4:3m HI \e[0m" shows 3m HI, instead of HI with curly underlines (test in e.g. alacritty, kitty or gnome terminal for expected behaviour).
I'll have a stab at adding support for these - as a first step by mapping double/curly/dotted/dashed underlines to normal underlines, and as a second step actually rendering them differently.