Don't modify loop control variable when looking for comments. #121

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Fixes #119 & #120, thanks to @doits, @kikyous and @xqin for initial reports.

The assignment [_, cur] = searchpos(...) modifies cur variable and does not increment it
if no result is found.
Use different variable name for searchpos return value and increase cur
at the end of loop.

Since this is my first time writing VimL please review this thoroughly - I'm pretty sure this is not the perfect solution.
Also I have no idea why this started occurring now - the plugin hasn't been changed recently. Might this be due to change in Vim itself somehow?

@DawidJanczak DawidJanczak Don't modify loop control variable when looking for comments.
The assignment [_, cur] modifies cur variable and does not increment it
if no result is found.
Use different variable name for searchpos return value and increase cur
at the end of loop.
2499bae

@CITguy CITguy added a commit to CITguy/vim-coffee-script that referenced this pull request Apr 8, 2013

@CITguy CITguy adding DawidJanczak patch for kchmck/vim-coffee-script issue #121 eb20263

@iangreenleaf iangreenleaf added a commit to iangreenleaf/vim-coffee-script that referenced this pull request Apr 14, 2013

@CITguy @iangreenleaf CITguy + iangreenleaf adding DawidJanczak patch for kchmck/vim-coffee-script issue #121 c13aa22

kchmck closed this Aug 22, 2013

Owner

kchmck commented Aug 22, 2013

For future bug searchers, please see #120

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