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 output completes pending op (d, y, ...) #5398

Closed
benwr opened this issue Sep 28, 2016 · 2 comments
Closed

:terminal output completes pending op (d, y, ...) #5398

benwr opened this issue Sep 28, 2016 · 2 comments
Assignees
Labels
bug issues reporting wrong behavior event-loop terminal built-in :terminal or :shell
Milestone

Comments

@benwr
Copy link

benwr commented Sep 28, 2016

I started using neovim last week, and one of my favorite features is the built-in terminal. It's extremely convenient. I'm coming from Emacs + Evil, and one of my longtime gripes was that eterm is terrible. Somehow neovim's terminal is exactly right, except for a few minor issues. In this case, if I have a big terminal window, output in the terminal can screw up input into text buffers.

NVIM v0.1.5
Build type: Debug
Compilation: /usr/lib/ccache/cc -Wconversion -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector --param ssp-buffer-size=4 -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/home/ben/sources/neovim/build/config -I/home/ben/sources/neovim/src -I/home/ben/sources/neovim/.deps/usr/include -I/home/ben/sources/neovim/.deps/usr/include -I/home/ben/sources/neovim/.deps/usr/include -I/home/ben/sources/neovim/.deps/usr/include -I/home/ben/sources/neovim/.deps/usr/include -I/home/ben/sources/neovim/.deps/usr/include -I/usr/include -I/home/ben/sources/neovim/build/src/nvim/auto -I/home/ben/sources/neovim/build/include
Compiled by ben@[redacted]

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

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"
  • Vim: N/A (doesn't have built-in terminal)
  • Operating system/version: Ubuntu 14.04
  • Terminal name/version: st 0.7, urxvt 9.19
  • $TERM: xterm-256color

Actual behaviour

When a program prints lots of things in TERMINAL mode, typing d in text buffers immediately deletes a line, as though you had typed dd. With really high volume output, other weird things seem to happen, but they're harder to reproduce without spamming so hard that my computer freezes.

Expected behaviour

d should wait for a text object as an argument, as it does in normal situations.

Steps to reproduce using nvim -u NORC

nvim -u NORC
i
some text 1
some text 2
some text 3
some text 4
<Esc>
<C-w>s
:term
while true; do yes | head -n 50; sleep 0.01; done # maybe tweak this to be more intense (shorter sleep, more lines of yes), depending on your system
<C-\><C-n>
<C-w>j
d
@fwalch
Copy link
Member

fwalch commented Oct 3, 2016

Alternative reproduction steps in #5417.

@fwalch fwalch added bug issues reporting wrong behavior terminal built-in :terminal or :shell labels Oct 3, 2016
@fwalch fwalch added this to the todo milestone Oct 3, 2016
@justinmk
Copy link
Member

justinmk commented Oct 3, 2016

Possibly the same root cause as #6166.

@justinmk justinmk self-assigned this Oct 3, 2016
@justinmk justinmk modified the milestones: 0.3, todo Nov 29, 2016
@justinmk justinmk changed the title High volume terminal output makes d not wait for an argument :terminal output completes pending op (d, y, ...) # Mar 10, 2017
@justinmk justinmk changed the title :terminal output completes pending op (d, y, ...) # :terminal output completes pending op (d, y, ...) Mar 10, 2017
hardenedapple added a commit to hardenedapple/neovim that referenced this issue Sep 2, 2017
hardenedapple added a commit to hardenedapple/neovim that referenced this issue Sep 2, 2017
hardenedapple added a commit to hardenedapple/neovim that referenced this issue Sep 2, 2017
hardenedapple added a commit to hardenedapple/neovim that referenced this issue Sep 3, 2017
nateozem pushed a commit to nateozem/neovim that referenced this issue Oct 5, 2017
normal_finish_command() and normal_prepare() assume that any pending
operator needs to be finished after any subsequent key.

Set `finish_op = false` in nv_event() to indicate that the pending
operator shouldn't be finished in normal_execute().

This is how nv_visual() indicates that 'v' or 'V' in operator-pending
mode should not finish the current pending operator.

fixes neovim#5398
fixes neovim#6166 (partially; mappings are still interrupted)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior event-loop terminal built-in :terminal or :shell
Projects
None yet
Development

No branches or pull requests

3 participants