+2

Subtract select not working properly (API)

Kroum Tzanev vor 12 Jahren 0

If a < b < c, when we subtract the region [a,b] from the region [a,c] the result is [a,a] (or empty) and not the expected [b,c].


>>> view.sel().clear()
>>> view.sel().add(sublime.Region(0,10))
>>> view.sel().subtract(sublime.Region(0,5))
You can see that everything is working ok if you replace on of the two 0s by 1 or 2 for example. 
Note : You should move the scroll bar to update the selections in the view.