-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
Expected behavior
view.extract_scope method returns same result.
Actual behavior
view.extract_scope method returns different results depending on phantom presence/absence.
Steps to reproduce
-
create new view, set Python syntax via palette, type class and autocomplete
class ClassName(object): """docstring for ClassName""" def __init__(self, arg): super(ClassName, self).__init__() self.arg = arg
-
open console and execute
a.import pprint
b.pprint.pprint([[i, view.extract_scope(i)] for i in range(24)])
c.phantoms = sublime.PhantomSet(view)
d.phantoms.update([sublime.Phantom(sublime.Region(22), 'yo', sublime.LAYOUT_INLINE)])
e.pprint.pprint([[i, view.extract_scope(i)] for i in range(24)]) -
compare results of 2.b and 2.e (0-14 are omitted)
| point | b | e |
|---|---|---|
| 15 | (15, 22) | (15, 22) |
| 16 | (16, 22) | (15, 22) |
| 17 | (16, 22) | (15, 22) |
| 18 | (16, 22) | (15, 22) |
| 19 | (16, 22) | (15, 22) |
| 20 | (16, 22) | (15, 22) |
| 21 | (16, 22) | (15, 22) |
| 22 | (16, 23) | (22, 24) |
| 23 | (22, 24) | (22, 24) |
Note, size and layout of phantom does not affect the results in any manner
Environment
- Operating system and version:
- Windows 8.1
- Mac OS ...
- Linux ...
- Sublime Text:
- Build 3126