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

HOME and END does not work properly in neovim in tmux in FreeBSD 12.1 #13292

Open
pepoluan opened this issue Nov 14, 2020 · 1 comment
Open
Labels
bug issues reporting wrong behavior platform:bsd issues specific to BSD descendants (please specify which in the issue) tui

Comments

@pepoluan
Copy link

pepoluan commented Nov 14, 2020

Note: Neovim installed using pkg install neovim, not from ports.

  • nvim --version:
NVIM v0.4.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wno-c11-extensions -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/wrkdirs/usr/ports/editors/neovim/work/.build/config -I/wrkdirs/usr/ports/editors/neovim/work/neovim-0.4.4/src -I/usr/local/include -I/usr/include -I/wrkdirs/usr/ports/editors/neovim/work/.build/src/nvim/auto -I/wrkdirs/usr/ports/editors/neovim/work/.build/include
Compiled by root@121amd64-quarterly-job-08

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info
  • vim -u DEFAULTS (version: ) behaves differently?

I am not using vim, but HOME & END works properly in zsh, in tmux, and in nano

  • Operating system/version:
# freebsd-version                                                                                                                                                                                                                                                   [12:46:12]
12.1-RELEASE
  • Terminal name/version:

KiTTY v0.74.2.5p @ 09/10/2020-17:13:24(GMT)

(KiTTY is a fork of PuTTY)

  • $TERM:
  • putty-256color in zsh outside tmux
  • tmux-256color in zsh inside tmux

Steps to reproduce using nvim -u NORC

nvim -u NORC
# Alternative for shell-related problems:
# env -i TERM=ansi-256color "$(which nvim)"

Actual behaviour

Home & End key do not move the cursor.

Expected behaviour

Home & End key should move the cursor to the beginning and end of line, respectively.

infocmp output attached:

@pepoluan pepoluan added the bug issues reporting wrong behavior label Nov 14, 2020
@erw7
Copy link
Contributor

erw7 commented Nov 16, 2020

unibilium is unable to handle terminfo stored in hashed database (On FreeBSD, terminfo is stored in a hashed database). Thus there are some terminals on FreeBSD where the Home and End etc keys will not work even if terminfo (result of infocmp) and TERM environment variables are correct.

There are two workarounds.

  1. In PuTTY (KiTTY), set Terminal -> Keyboard -> The Home and End keys to rxvt, and then use neovim to do :noremap <kHome> <End> (The Home key works without setting the map).
  2. Copy the termininfo stored in the directory tree of Linux or MSYS2 etc. to $HOME/.termininfo (You only need to copy the entries you need).

@clason clason added platform:bsd issues specific to BSD descendants (please specify which in the issue) and removed platform:freebsd labels Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior platform:bsd issues specific to BSD descendants (please specify which in the issue) tui
Projects
None yet
Development

No branches or pull requests

3 participants