diff --git a/README.md b/README.md index 448b575..521a79b 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,11 @@ New Features: - Bugfix release (#23, thanks for reporting this issue, @passalini!) +## What's new ## +- 1.4.2: Fix range / negative steps [#24](https://github.com/duydao/Text-Pastry/issues/24) - Thanks [@TheClams](https://github.com/TheClams) +- 1.4.1: Hotfix for [#23](https://github.com/duydao/Text-Pastry/issues/23) - Thanks [@dufferzafar](https://github.com/dufferzafar) +- 1.4.0: [New Features!](https://github.com/duydao/Text-Pastry#release-notes-140) + ## Release Notes 1.4.0 ## I'm very excited to announce v1.4.0! The Code was actually released a few months ago, but I need the extra time to check the new features and update the [wiki](https://github.com/duydao/Text-Pastry/wiki). @@ -136,6 +141,8 @@ The script/code will get some basic information like selected text, index, etc. ## Releases ## +- 1.4.2: Fix range / negative steps [#24](https://github.com/duydao/Text-Pastry/issues/24) - Thanks [@TheClams](https://github.com/TheClams) +- 1.4.1: Hotfix for [#23](https://github.com/duydao/Text-Pastry/issues/23) - Thanks [@dufferzafar](https://github.com/dufferzafar) - 1.4.0: New Features: command-line, presets and selection modifiers, focus mode - 1.3.7: Bugfix release [#17](https://github.com/duydao/Text-Pastry/issues/17) - 1.3.6: Bugfix release [#14](https://github.com/duydao/Text-Pastry/issues/14) diff --git a/text_pastry.py b/text_pastry.py index 04a566f..62922b8 100644 --- a/text_pastry.py +++ b/text_pastry.py @@ -675,7 +675,7 @@ def run(self, edit, start=0, stop=None, step=1, padding=1, fillchar='0', justify if global_settings('range_include_end_index', True): stop += step # if stop is negative, step needs to be negative aswell - if (start > stop): + if (start > stop and step > 0): step = step * -1 items = [str(x) for x in range(start, stop, step)] if padding > 1: