Skip to content

Commit

Permalink
Merge pull request #3 from nevdelap/master
Browse files Browse the repository at this point in the history
Issue 2: Breaks multiline editing.
  • Loading branch information
sh4nks authored May 30, 2018
2 parents 3f6c631 + 7951fc4 commit 8639fe8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions auto_close.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ def run(self, edit, prefix=""):
cursorPosition = self.view.sel()[0].begin()
# close the tag
self.view.run_command('close_tag')
self.view.sel().clear()
self.view.sel().add(cursorPosition)
# Put the cursor(s) back inside the tag.
newCursorPosition = self.view.sel()[0].begin()
for i in range(cursorPosition, newCursorPosition):
self.view.run_command('move', { 'by': 'characters', 'forward': False })

0 comments on commit 8639fe8

Please sign in to comment.