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

:terminal doesn't handle Ctrl-Arrows correctly #5024

Closed
joshtriplett opened this issue Jul 9, 2016 · 4 comments
Closed

:terminal doesn't handle Ctrl-Arrows correctly #5024

joshtriplett opened this issue Jul 9, 2016 · 4 comments
Labels
bug issues reporting wrong behavior terminal built-in :terminal or :shell
Milestone

Comments

@joshtriplett
Copy link
Contributor

  • nvim --version:
NVIM 0.1.4
Build type: None
Compilation: /usr/bin/cc -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1  -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim-1AXpO2/neovim-0.1.4/build/config -I/build/neovim-1AXpO2/neovim-0.1.4/src -I/usr/include -I/usr/include -I/usr/include/luajit-2.0 -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/build/neovim-1AXpO2/neovim-0.1.4/build/src/nvim/auto -I/build/neovim-1AXpO2/neovim-0.1.4/build/include
Compiled by buildd@babin

Optional features included (+) or not (-): +acl   +iconv    +jemalloc 
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
  • Vim (version: ) behaves differently?

N/A; vim doesn't have :terminal

  • Operating system/version:

Latest Debian sid, with neovim 0.1.4-1 from experimental.

  • Terminal name/version:

gnome-terminal 3.20.2

  • $TERM:

xterm-256color

Actual behaviour

Pressing Ctrl-Left or Ctrl-Right produces a string of invalid characters (on my terminal, they look like the Unicode replacement character, �). The first such key produces a longer string of such characters; subsequent presses generate a shorter string. :terminal mode also gets confused about the cursor position when dealing with those characters.

Expected behaviour

Pass through Ctrl-Left, Ctrl-Right, and other modified arrow keys using the same sequences that my terminal provided, so that terminal applications that understand them can use them. (For instance, I have ~/.inputrc configured to map them to backward-word and forward-word in any applications that use Readline.)

Steps to reproduce using nvim -u NORC

nvim -u NORC
:terminal
Hit Ctrl-Left or Ctrl-Right
@justinmk
Copy link
Member

justinmk commented Jul 9, 2016

keep an eye on #5014


btw, regarding your debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830580 see #1646 for discussion of why we don't support vimdiff etc.

@justinmk justinmk added terminal built-in :terminal or :shell bug issues reporting wrong behavior labels Jul 9, 2016
@justinmk justinmk added this to the todo milestone Jul 9, 2016
@joshtriplett
Copy link
Contributor Author

@justinmk #5014 does look related, thanks.

Regarding vimdiff (off topic for this bug, but I'll post this to the Debian bug report), it'd be easy enough for the Debian package to have a shell script "nvimdiff" that just does exec nvim -d "$@", and then install that as an alternative for /usr/bin/vimdiff. Likewise "nview" and nvim -R. I agree that they don't need special argv[0] checks in nvim itself; it'd just be nice to help well-trained fingers and tools like git mergetool

(Personally, I find that nvim has such good vim compatibility that I ran nvim -u ~/.vimrc and felt right at home; the only thing missing was support for packpath, which I assume will show up as new versions of nvim pull in more vim patches.)

@justinmk
Copy link
Member

justinmk commented Jul 9, 2016

packpath was added this morning, thanks to @jamessan :)

@jamessan
Copy link
Member

jamessan commented Jul 9, 2016

the only thing missing was support for packpath, which I assume will show up as new versions of nvim pull in more vim patches.

Yeah, I specifically wanted to get that into Neovim ASAP, so I could update Debian's vim-addon-manager to use it, as I think we've discussed before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior terminal built-in :terminal or :shell
Projects
None yet
Development

No branches or pull requests

3 participants