Skip to content

Commit

Permalink
Merge pull request #2830 from reujab/surround-workaround
Browse files Browse the repository at this point in the history
Workaround surround bug
  • Loading branch information
xconverge authored Jul 20, 2018
2 parents dfb4b7a + 95122a3 commit 1a5f358
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/actions/plugins/surround.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ class CommandSurroundAddTarget extends BaseCommand {
}

// It's possible we're already done, e.g. dst
await CommandSurroundAddToReplacement.TryToExecuteSurround(vimState, position);
if (await CommandSurroundAddToReplacement.TryToExecuteSurround(vimState, position)) {
this.isCompleteAction = true;
}

return vimState;
}
Expand Down Expand Up @@ -326,7 +328,9 @@ export class CommandSurroundAddToReplacement extends BaseCommand {

vimState.surround.replacement += stringToAdd;

await CommandSurroundAddToReplacement.TryToExecuteSurround(vimState, position);
if (await CommandSurroundAddToReplacement.TryToExecuteSurround(vimState, position)) {
this.isCompleteAction = true;
}

return vimState;
}
Expand All @@ -347,7 +351,7 @@ export class CommandSurroundAddToReplacement extends BaseCommand {
vimState.recordedState.surroundKeys.push(vimState.keyHistory[i]);
}

return false;
return true;
}

// we assume that we start directly on the characters we're operating over
Expand Down

0 comments on commit 1a5f358

Please sign in to comment.