Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ascandella committed Jul 25, 2016
1 parent b29bf62 commit 2ae3f88
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ class CommandHash extends BaseCommand {
vimState.searchState = new SearchState(-1, vimState.cursorPosition, currentWord);

do {
// use getWordLeft() on position to start at the beginning of the word.
// this ensures that any matches happen ounside of the word currently selected,
// which are the desired semantics for this motion.
vimState.cursorPosition = vimState.searchState.getNextSearchMatchPosition(vimState.cursorPosition.getWordLeft()).pos;
} while (CommandStar.GetWordAtPosition(vimState.cursorPosition) !== currentWord);

Expand Down

0 comments on commit 2ae3f88

Please sign in to comment.