Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Strange behavior of neovim after update #20620

Open
Vanillma opened this issue Jun 21, 2024 · 20 comments · May be fixed by termux/termux-app#4154
Open

[Bug]: Strange behavior of neovim after update #20620

Vanillma opened this issue Jun 21, 2024 · 20 comments · May be fixed by termux/termux-app#4154
Assignees
Labels
bug report Something is not working properly help wanted Help is wanted in order to solve the issue termux-app

Comments

@Vanillma
Copy link

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

XRecorder_21062024_092425.mp4

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
@Vanillma Vanillma added bug report Something is not working properly untriaged labels Jun 21, 2024
@Biswa96
Copy link
Member

Biswa96 commented Jun 21, 2024

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.

@Vanillma
Copy link
Author

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!!

XRecorder_21062024_122757.mp4
XRecorder_21062024_122631.mp4

@truboxl truboxl removed the untriaged label Jun 21, 2024
@agnostic-apollo
Copy link
Member

Update to at least v0.118.1 and then check.

https://github.com/termux/termux-app/releases

@TomJo2000
Copy link
Member

TomJo2000 commented Jun 21, 2024

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.

@TomJo2000 TomJo2000 self-assigned this Jun 21, 2024
@Biswa96
Copy link
Member

Biswa96 commented Jun 21, 2024

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.1 and 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?

@agnostic-apollo
Copy link
Member

Yes, it's latest but terminal issues fixed should be same in both.

@agnostic-apollo
Copy link
Member

It's more likely an issue with neovim escape sequence though as suggested above too.

@Vanillma
Copy link
Author

Update to at least v0.118.1 and then check.

https://github.com/termux/termux-app/releases

Thanks for the suggestion...I updated and the problem is still there.

XRecorder_21062024_190537.mp4

@agnostic-apollo
Copy link
Member

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.

@TomJo2000
Copy link
Member

I am still completely unable to replicate the issue.
@Vanillma you said it happens with nvim --clean as well?

@TomJo2000
Copy link
Member

@TomJo2000
Copy link
Member

TomJo2000 commented Jun 21, 2024

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.

@Vanillma
Copy link
Author

Vanillma commented Jun 22, 2024

I am still completely unable to replicate the issue. @Vanillma you said it happens with nvim --clean as 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 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.

This is my default setting:
guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20
Screenshot_20240622-074940_Termux

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

@TomJo2000
Copy link
Member

TomJo2000 commented Jun 22, 2024

Yep currently working on

Needed a pretty substantial rewrite of the libtreesitter build to make sure we're building the parsers we need for neovim.

@Vanillma
Copy link
Author

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😬

@TomJo2000
Copy link
Member

TomJo2000 commented Jun 22, 2024

libtreesitter PR is now open as:

Superseded by:

@ghost
Copy link

ghost commented Jun 22, 2024

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 ).

@Vanillma
Copy link
Author

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!

@TomJo2000 TomJo2000 added the help wanted Help is wanted in order to solve the issue label Jun 23, 2024
@Grimler91
Copy link
Member

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

@fornwall
Copy link
Member

fornwall commented Jun 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly help wanted Help is wanted in order to solve the issue termux-app
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants