From cb82f280a9d94b1dbb52d8f68ae5c0ebdb312003 Mon Sep 17 00:00:00 2001 From: Kristinita Date: Fri, 24 Mar 2017 14:16:04 +0300 Subject: [PATCH 1/2] [Fixed] Increment Selection package conflict --- numeric.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/numeric.py b/numeric.py index d3ab020..3b80023 100644 --- a/numeric.py +++ b/numeric.py @@ -38,13 +38,14 @@ class IntegerSequenceCommand(bases.PerIntegerTextCommand): + def pre(self): super(IntegerSequenceCommand, self).pre() self.ind = 0 def per_int(self, intval): self.ind += 1 - return str(self.ind-1) + return str(self.ind - 1) """ Converts selected hex numbers into decimal equivalents @@ -52,6 +53,7 @@ def per_int(self, intval): class HexToDecimalCommand(bases.PerWordTextCommand): + def per_word(self, text): try: int_val = int(text, base=16) @@ -66,6 +68,7 @@ def per_word(self, text): class DecimalToHexCommand(bases.PerIntegerTextCommand): + def per_int(self, num): return num_to_hex(num) @@ -74,7 +77,8 @@ def per_int(self, num): """ -class IncrementSelectionCommand(bases.PerIntegerTextCommand): +class TextCommandsIncrementSelectionCommand(bases.PerIntegerTextCommand): + def per_int(self, num): num += 1 return str(num) @@ -85,6 +89,7 @@ def per_int(self, num): class DecrementSelectionCommand(bases.PerIntegerTextCommand): + def per_int(self, num): num -= 1 return str(num) From 5a6ad2bf0dcbe02acf0da8c69b976ff8c14e9e7c Mon Sep 17 00:00:00 2001 From: Kristinita Date: Fri, 24 Mar 2017 14:27:31 +0300 Subject: [PATCH 2/2] [Fixed] Sorry, I forgot fix in sublime-commands file --- Default.sublime-commands | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Default.sublime-commands b/Default.sublime-commands index be58227..7753de2 100644 --- a/Default.sublime-commands +++ b/Default.sublime-commands @@ -14,7 +14,7 @@ {"caption":"TextCommands: Integer Sequence", "command":"integer_sequence"}, {"caption":"TextCommands: Decimal To Hex", "command":"decimal_to_hex"}, {"caption":"TextCommands: Hex To Decimal", "command":"hex_to_decimal"}, - {"caption":"TextCommands: Increment Selection", "command":"increment_selection"}, + {"caption":"TextCommands: Increment Selection", "command":"text_commands_increment_selection"}, {"caption":"TextCommands: Decrement Selection", "command":"decrement_selection"}, {"caption":"TextCommands: Selection Length", "command":"selection_length"}, {"caption":"TextCommands: Sort Text", "command":"sort_text"},