duydao / Text-Pastry

Extend the power of multiple selections in Sublime Text. Modify selections, insert numeric sequences, incremental numbers, generate uuids, date ranges, insert continuously from a word list and more.
MIT License
832 stars 46 forks source link

The insert_nums command doesn't seem to be working on ST3 Build 3065 #23

Closed dufferzafar closed 9 years ago

dufferzafar commented 9 years ago

\i0, \i1 commands stopped working for me while everything else was working as expected.

I couldn't figure out what exactly was causing the bug, but got things working for myself by changing the following lines (in text_pastry.py, Line 600):

self.history_manager.append(data={"command": "insert_nums", "args": {"current": "1", "step": "1", "padding": "1"}}, label=item.label)
self.window.run_command("insert_nums", {"current": "1", "step": "1", "padding": "1"})

with:

self.history_manager.append(data={"command": "text_pastry_range", "args": {'start': 1, 'step': 1, 'padding': 1}}, label=item.label)
self.window.run_command("text_pastry_range", {'start': 1, 'step': 1, 'padding': 1})
duydao commented 9 years ago

Thanks for reporting this. I've missed some old references to insert_nums, I've changed to code as suggested and fixed othere references as well.

Thanks for using Text Pastry!