Skip to content

Commit

Permalink
fixes #3332
Browse files Browse the repository at this point in the history
  • Loading branch information
xconverge committed Jan 6, 2019
1 parent 839a34f commit 0934c5a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/actions/commands/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3964,6 +3964,11 @@ abstract class IncrementDecrementNumberAction extends BaseCommand {
public async exec(position: Position, vimState: VimState): Promise<VimState> {
const text = TextEditor.getLineAt(position).text;

// Make sure position within the text is possible and return if not
if (text.length <= position.character) {
return vimState;
}

// Start looking to the right for the next word to increment, unless we're
// already on a word to increment, in which case start at the beginning of
// that word.
Expand Down

0 comments on commit 0934c5a

Please sign in to comment.