Skip to content

Commit

Permalink
Shrink selections to actives when undo/redo.
Browse files Browse the repository at this point in the history
  • Loading branch information
aioutecism committed Sep 17, 2016
1 parent 7a51e56 commit 76b12e8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Actions/History.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import {commands} from 'vscode';
import {ActionSelection} from './Selection';

export class ActionHistory {

static undo(): Thenable<boolean> {
return commands.executeCommand('undo');
return commands.executeCommand('undo')
.then(() => ActionSelection.shrinkToActives());
}

static redo(): Thenable<boolean> {
return commands.executeCommand('redo');
return commands.executeCommand('redo')
.then(() => ActionSelection.shrinkToActives());
}

};

0 comments on commit 76b12e8

Please sign in to comment.