rogual / neovim-dot-app

Mac OS X GUI for Neovim
1.13k stars 62 forks source link

Incorrect change behavior (affects many other commands too) #173

Closed baileyparker closed 9 years ago

baileyparker commented 9 years ago

With the current HEAD of the repo (https://github.com/rogual/neovim-dot-app/commit/4a6c0f3a7eeea0242ecb2d83e59ccc7f73463851), the change command works incorrectly (this only happens in the app, in my terminal, nvim handles it properly).

Steps to reproduce:

  1. Launch the app and open a new buffer
  2. Type i, add some text (ex. this is a test), and then ESC
  3. Move back somewhere in the text (the movement command doesn't matter, neither does the location), eg. b
  4. Your cursor should now be before (on) the t (if you did b). Now try to cw.

Expected:

The word test disappears and you enter insert mode where the cursor was.

this is a |

Where | is the cursor

Actual Result:

A w is inserted before the cursor and you enter insert mode with your cursor after the w.

this is a w|test

This bug works with c + any movement command (ex. ce). In fact, it seems like c by itself for some reason acts exactly like i.

Side note: although probably obvious, C still works as expected (changes to the end of the line).

If it's relevant, I'm on 10.10.5 with neovim@32a9022.

I was previously on https://github.com/rogual/neovim-dot-app/commit/8b3590a2dd1de2aec2ea89136911716ac29313bc so I can bisect from there to see if I can help in identifying the offending commit.

EDIT: It seems that not only change is affected. This bug also affects anything that has an accompanying movement. So, for example, dd no longer deletes a line, yw just advances the cursor without yanking a word, etc.

baileyparker commented 9 years ago

Strange. As I started bisecting, I realized that after checking out another branch and then re-checking out HEAD, I was no longer able to reproduce the issue. Something must've gotten mucked up in git with my local copy (I'm positive I make cleaned properly).

Sorry for the errant issue!