-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
When recorded and then played back in a macro, wrap with abbreviation reports an error in the console:
'EmmetWrapWithAbbreviation' object has no attribute 'wrap_entries'
It seem that some logic like this is missing in the def run block:
Lines 355 to 379 in 843b50e
| view = self.view | |
| abbreviation.stop_tracking(view) | |
| wrap_entries = [] | |
| wrap_size = 0 | |
| for sel in list(self.view.sel()): | |
| config = wrap.get_wrap_config(view, sel.begin()) | |
| region = wrap.get_wrap_region(view, sel, config) | |
| lines = wrap.get_content(view, region, True) | |
| config.user_config['text'] = lines | |
| wrap_size += len(region) | |
| wrap_entries.append((region, config)) | |
| # Check for region overlapping | |
| self.wrap_entries = [] | |
| wrap_entries.sort(key=lambda item: item[0].begin()) | |
| for entry in wrap_entries: | |
| prev = self.wrap_entries[-1] if self.wrap_entries else None | |
| if prev and prev[0].intersects(entry[0]): | |
| prev[0] = prev[0].cover(entry[0]) | |
| else: | |
| self.wrap_entries.append(entry) |
When emmet_wrap_with_abbreviation is directly called from within a macro, wrap_entries is undefined then.
And since wrap_entries is always picked from the state of last widget input, it may also lead to other unexpected results?
Metadata
Metadata
Assignees
Labels
No labels