Skip to content

use getcurpos/setpos instead of winsaveview/winrestview#260

Merged
mattn merged 1 commit intomasterfrom
fix256
Jun 24, 2016
Merged

use getcurpos/setpos instead of winsaveview/winrestview#260
mattn merged 1 commit intomasterfrom
fix256

Conversation

@mattn
Copy link
Copy Markdown
Member

@mattn mattn commented Jun 8, 2016

Close #256

@jonathanewerner @tacahiroy Could you please try this?

@tacahiroy
Copy link
Copy Markdown
Member

I don't see any differences between them. I mean both implementations work well.
So if @jonathanewerner confirms this PR improves performance it's ok.

@jonathanglasmeyer
Copy link
Copy Markdown

jonathanglasmeyer commented Jun 23, 2016

No, the felt performance is identical.
I switched back to https://github.com/kien/ctrlp.vim for the time being because perf is good there. (But other bugs are present :/)

You can't see it really well because of the framerate, but here is a visual comparison:

kien/ctrlp.vim
kien/ctrlp.vim

Its very fluid, even more in the up motion (fps is like twice higher for up motion compared to the down motion 🤔)

this repo
this repo

It janky & the cursor jumps to the end of line shortly for each line which probably is the main culprit..

@mattn
Copy link
Copy Markdown
Member Author

mattn commented Jun 24, 2016

@jonathanewerner have you seen #186 ?

@mattn
Copy link
Copy Markdown
Member Author

mattn commented Jun 24, 2016

okay, I'll merge this. and if you still have problem, please file new issue.

@mattn mattn merged commit 7140122 into master Jun 24, 2016
@mattn mattn deleted the fix256 branch June 24, 2016 00:32
@Roguelazer
Copy link
Copy Markdown

I think this broke something; ctrlp now only works on the super-modern Vim I have installed from Homebrew; in the slightly older MacVim, I get the following error:

E121: Undefined variable: pos
E116: Invalid arguments for function setpos

Working version:

% /usr/local/bin/vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 14 2016 16:34:13)
MacOS X (unix) version
Included patches: 1-1910
Compiled by Homebrew

Non-working version:

% vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 21 2014 14:54:22)
MacOS X (unix) version
Included patches: 1-258
Compiled by Bjorn Winckler <bjorn.winckler@gmail.com>

@mattn
Copy link
Copy Markdown
Member Author

mattn commented Jun 24, 2016

Could you please try last commit?

@jonathanglasmeyer
Copy link
Copy Markdown

What does #186 have to do with this?

@mattn
Copy link
Copy Markdown
Member Author

mattn commented Jun 24, 2016

kien/ctrlp move up cursor if set let g:ctrlp_lazy_update = 1. So I fixed it.

@Roguelazer
Copy link
Copy Markdown

@mattn it works now, thanks!

@mattn
Copy link
Copy Markdown
Member Author

mattn commented Jun 24, 2016

👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants