Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
1.3.2, compatibility with 31105
Browse files Browse the repository at this point in the history
  • Loading branch information
zrzka committed Oct 25, 2017
1 parent 0a58dbb commit 8b4f20d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* Fixed exception when there's empty tab opened (#30)
* Open quickly selects proper tab when the file is already opened
and empty tab exists as well
* Compatibility check with 311015
* `Cmd-Shift-]`, `Cmd-Shift-[` registered only in Pythonista < 311015
* These shortcuts are natively supported

## 1.3.1 (2017-10-19)

Expand Down
18 changes: 9 additions & 9 deletions blackmamba/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
from blackmamba.log import info, error, get_level, set_level, ERROR
import blackmamba.system as system

__version__ = '1.3.1'
__version__ = '1.3.2'
__author__ = 'Robert Vojta'

_LATEST_VERSION_COMPATIBILITY_TEST = (311014, '3.1.1')
_LATEST_VERSION_COMPATIBILITY_TEST = (311015, '3.1.1')


def _register_key_command(input, modifier, function, title=None):
Expand Down Expand Up @@ -66,7 +66,7 @@ def _register_ios11_default_key_commands():


@system.Pythonista(appex=False)
def _register_pre_311013_key_commands():
def _register_pre_311015_key_commands():
from blackmamba.uikit.keyboard import UIKeyModifier
import blackmamba.ide.tab as tab

Expand All @@ -84,7 +84,11 @@ def _register_pre_311013_key_commands():
tab.select_previous_tab,
'Show Previous Tab'),
('T', UIKeyModifier.command,
'new_tab.py', 'New Tab')
'new_tab.py', 'New Tab'),
(']', UIKeyModifier.command | UIKeyModifier.shift,
tab.select_next_tab),
('[', UIKeyModifier.command | UIKeyModifier.shift,
tab.select_previous_tab),
]

for command in commands:
Expand Down Expand Up @@ -137,10 +141,6 @@ def _register_default_key_commands():
('0', UIKeyModifier.command,
tab.toggle_navigator,
'Toggle Navigator'),
(']', UIKeyModifier.command | UIKeyModifier.shift,
tab.select_next_tab),
('[', UIKeyModifier.command | UIKeyModifier.shift,
tab.select_previous_tab),
(UIKeyInput.upArrow, UIKeyModifier.control,
source.page_up),
(UIKeyInput.downArrow, UIKeyModifier.control,
Expand All @@ -160,7 +160,7 @@ def select_tab():
for i in range(9):
_register_key_command(str(i + 1), UIKeyModifier.command, _make_select_tab(i))

_register_pre_311013_key_commands()
_register_pre_311015_key_commands()

# No need to show Cmd-[Shift]-S to users
_log_level = get_level()
Expand Down

0 comments on commit 8b4f20d

Please sign in to comment.