import sublime, sublime_plugin
_start = -1


class StartSelection(sublime_plugin.TextCommand):

    def run(self, edit):
        global _start
        for sel in self.view.sel():
            if sel.empty():
                _start = sel.begin()


class EndSelection(sublime_plugin.TextCommand):

    def run(self, edit):
        global _start
        start = _start
        end = -1
        for sel in self.view.sel():
            if sel.empty():
                end = sel.begin()
        if start != -1 and end != -1:
            self.view.sel().clear()
            self.view.sel().add(sublime.Region(start, end))

10d5b45b8e1ed3f4996554b0575a0e25e7580099
<mask token>


class EndSelection(sublime_plugin.TextCommand):

    def run(self, edit):
        global _start
        start = _start
        end = -1
        for sel in self.view.sel():
            if sel.empty():
                end = sel.begin()
        if start != -1 and end != -1:
            self.view.sel().clear()
            self.view.sel().add(sublime.Region(start, end))

<mask token>


class StartSelection(sublime_plugin.TextCommand):
    <mask token>


class EndSelection(sublime_plugin.TextCommand):

    def run(self, edit):
        global _start
        start = _start
        end = -1
        for sel in self.view.sel():
            if sel.empty():
                end = sel.begin()
        if start != -1 and end != -1:
            self.view.sel().clear()
            self.view.sel().add(sublime.Region(start, end))

<mask token>
_start = -1


class StartSelection(sublime_plugin.TextCommand):

    def run(self, edit):
        global _start
        for sel in self.view.sel():
            if sel.empty():
                _start = sel.begin()


class EndSelection(sublime_plugin.TextCommand):

    def run(self, edit):
        global _start
        start = _start
        end = -1
        for sel in self.view.sel():
            if sel.empty():
                end = sel.begin()
        if start != -1 and end != -1:
            self.view.sel().clear()
            self.view.sel().add(sublime.Region(start, end))

import sublime, sublime_plugin
_start = -1


class StartSelection(sublime_plugin.TextCommand):

    def run(self, edit):
        global _start
        for sel in self.view.sel():
            if sel.empty():
                _start = sel.begin()


class EndSelection(sublime_plugin.TextCommand):

    def run(self, edit):
        global _start
        start = _start
        end = -1
        for sel in self.view.sel():
            if sel.empty():
                end = sel.begin()
        if start != -1 and end != -1:
            self.view.sel().clear()
            self.view.sel().add(sublime.Region(start, end))
