Skip to content

Commit

Permalink
Fixes #13. Errant view shift. via @stephen147
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasBuse committed Apr 12, 2021
1 parent d9cc256 commit 919cd16
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DeleteBlankLines.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class DeleteBlankLinesCommand( sublime_plugin.TextCommand ):
def run( self, edit, surplus=False):
newSelections = []

col, row = self.view.viewport_position()

settings = sublime.load_settings('DeleteBlankLines.sublime-settings')

# Create an() edit object, demarcating an undo group.
Expand Down Expand Up @@ -46,6 +48,8 @@ def run( self, edit, surplus=False):
if (st_version == 2):
self.view.end_edit( edit )

self.view.set_viewport_position([0, row])

def strip( self, edit, currentSelection, surplus ):
# Convert the input range to a string, this represents the original selection.
orig = self.view.substr(currentSelection)
Expand Down

0 comments on commit 919cd16

Please sign in to comment.