Skip to content

Commit e306c12

Browse files
committed
Fix showing messages when Package Control disables itself and then re-enables itself during a self-upgrade
1 parent 5ec8f0f commit e306c12

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

package_control/commands/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from .remove_package_command import RemovePackageCommand
1414
from .upgrade_all_packages_command import UpgradeAllPackagesCommand
1515
from .upgrade_package_command import UpgradePackageCommand
16-
from .package_message_command import PackageMessageCommand
1716
from .package_control_insert_command import PackageControlInsertCommand
1817
from .package_control_tests_command import PackageControlTestsCommand
1918
from .remove_channel_command import RemoveChannelCommand
@@ -34,7 +33,6 @@
3433
'RemovePackageCommand',
3534
'UpgradeAllPackagesCommand',
3635
'UpgradePackageCommand',
37-
'PackageMessageCommand',
3836
'PackageControlInsertCommand',
3937
'PackageControlTestsCommand',
4038
'RemoveChannelCommand',

package_control/commands/package_message_command.py

-11
This file was deleted.

package_control/package_manager.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1170,17 +1170,23 @@ def print_to_panel():
11701170
view.set_scratch(True)
11711171

11721172
def write(string):
1173-
view.run_command('package_message', {'string': string})
1173+
view.run_command('insert', {'characters': string})
11741174

11751175
if not view.size():
1176+
position = 0
11761177
view.settings().set("word_wrap", True)
1178+
view.settings().set("auto_indent", False)
11771179
write('Package Control Messages\n' +
11781180
'========================')
1181+
else:
1182+
position = view.size()
11791183

11801184
write(output)
11811185
if window.active_view() != view:
11821186
window.focus_view(view)
11831187

1188+
view.show(sublime.Region(position, position))
1189+
11841190
sublime.set_timeout(print_to_panel, 1)
11851191

11861192
def remove_package(self, package_name, is_dependency=False):

package_control/reloader.py

-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@
124124
'.commands.install_package_command',
125125
'.commands.list_packages_command',
126126
'.commands.list_unmanaged_packages_command',
127-
'.commands.package_message_command',
128127
'.commands.remove_channel_command',
129128
'.commands.remove_package_command',
130129
'.commands.remove_repository_command',

0 commit comments

Comments
 (0)