#NEWLINE# def splitSelection( self , separator ) : #NEWLINE# #INDENT# view = self . view #NEWLINE# newRegions = [ ] #NEWLINE# for region in self . savedSelection : #NEWLINE# #INDENT# currentPosition = region . begin ( ) #NEWLINE# regionString = view . substr ( region ) #NEWLINE# if separator : #NEWLINE# #INDENT# subRegions = regionString . split ( separator ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# subRegions = list ( newRegion ) #NEWLINE# #UNINDENT# for subRegion in subRegions : #NEWLINE# #INDENT# newRegion = sublime . Region ( currentPosition , ( currentPosition + len ( subRegion ) ) ) #NEWLINE# newRegions . append ( newRegion ) #NEWLINE# currentPosition += ( len ( subRegion ) + len ( separator ) ) #NEWLINE# #UNINDENT# #UNINDENT# selection = view . sel ( ) #NEWLINE# selection . clear ( ) #NEWLINE# for region in newRegions : #NEWLINE# #INDENT# selection . add ( region ) #NEWLINE# #UNINDENT# self . workaroundForRefreshBug ( view , selection )