XVimProject / XVim

Xcode plugin for Vim keybindings
MIT License
5.16k stars 595 forks source link

First input of newly created view is not evaluated #78

Closed JugglerShu closed 12 years ago

JugglerShu commented 12 years ago

When you open new view the first input to the view is not handled properly.

How to reproduce

  1. Show new file by selecting a file not viewing currently from project navigator.
  2. Click somewhere in the view and set a cursor at any position.
  3. Press 'j'

    The current result

Cursor does not move

The expected result

Cursor should move down one line down

Note

Not only 'j' but 'p' or any other key input seems not working. When input 'j' I got following log

[XVimMotionEvaluator _motionFixedFrom:To:Type:] [Line 52] from:0 to:0 type:1

I did some easy debug but could not understand why this happens...

tomlu commented 12 years ago

From cursory examination it seems like it is caused by NSTextView selectedRange returning an empty range until it's been set by XVim.

dojoteef commented 12 years ago

This can be closed out. It was fixed by Issue #83.