Skip to content

Commit

Permalink
Fix insert side with i and a (fixes #23).
Browse files Browse the repository at this point in the history
  • Loading branch information
71 committed Nov 20, 2019
1 parent f3e48fa commit f720f96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/insert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { registerCommand, Command, CommandFlags } from '.'


registerCommand(Command.insertBefore, CommandFlags.ChangeSelections | CommandFlags.SwitchToInsert, editor => {
editor.selections = editor.selections.map(x => new vscode.Selection(x.anchor, x.anchor))
editor.selections = editor.selections.map(x => new vscode.Selection(x.start, x.start))
})

registerCommand(Command.insertAfter, CommandFlags.ChangeSelections | CommandFlags.SwitchToInsert, editor => {
editor.selections = editor.selections.map(x => new vscode.Selection(x.active, x.active))
editor.selections = editor.selections.map(x => new vscode.Selection(x.end, x.end))
})

registerCommand(Command.insertLineStart, CommandFlags.ChangeSelections | CommandFlags.SwitchToInsert, editor => {
Expand Down

0 comments on commit f720f96

Please sign in to comment.