|
25 | 25 |
|
26 | 26 | # |
27 | 27 | # Changelog: |
| 28 | +# 3.10: |
| 29 | +# * Fix exception in `/autosort helpers swap`. |
28 | 30 | # 3.9: |
29 | 31 | # * Remove `buffers.pl` from recommended settings. |
30 | 32 | # 3,8: |
|
87 | 89 |
|
88 | 90 | SCRIPT_NAME = 'autosort' |
89 | 91 | SCRIPT_AUTHOR = 'Maarten de Vries <[email protected]>' |
90 | | -SCRIPT_VERSION = '3.9' |
| 92 | +SCRIPT_VERSION = '3.10' |
91 | 93 | SCRIPT_LICENSE = 'GPL3' |
92 | 94 | SCRIPT_DESC = 'Flexible automatic (or manual) buffer sorting based on eval expressions.' |
93 | 95 |
|
@@ -616,7 +618,6 @@ def command_helper_swap(buffer, command, args): |
616 | 618 | except KeyError as e: |
617 | 619 | raise HumanReadableError('No such helper: {0}'.format(e.args[0])) |
618 | 620 |
|
619 | | - config.helpers.swap(index_a, index_b) |
620 | 621 | config.save_helpers() |
621 | 622 | command_helper_list(buffer, command, '') |
622 | 623 | return weechat.WEECHAT_RC_OK |
@@ -829,7 +830,7 @@ def on_autosort_command(data, buffer, args): |
829 | 830 |
|
830 | 831 | def add_completions(completion, words): |
831 | 832 | for word in words: |
832 | | - weechat.hook_completion_list_add(completion, word, 0, weechat.WEECHAT_LIST_POS_END) |
| 833 | + weechat.completion_list_add(completion, word, 0, weechat.WEECHAT_LIST_POS_END) |
833 | 834 |
|
834 | 835 | def autosort_complete_rules(words, completion): |
835 | 836 | if len(words) == 0: |
@@ -1001,14 +1002,14 @@ def on_autosort_complete(data, name, buffer, completion): |
1001 | 1002 |
|
1002 | 1003 | {*white}# Recommended settings |
1003 | 1004 | For the best visual effect, consider setting the following options: |
1004 | | - {*white}/set {cyan}irc.look.server_buffer{reset} {brown}independent{reset} |
| 1005 | +{*white}/set {cyan}irc.look.server_buffer{reset} {brown}independent{reset} |
1005 | 1006 |
|
1006 | 1007 | This setting allows server buffers to be sorted independently, which is |
1007 | 1008 | needed to create a hierarchical tree view of the server and channel buffers. |
1008 | 1009 |
|
1009 | 1010 | If you are using the {*default}buflist{reset} plugin you can (ab)use Unicode to draw a tree |
1010 | 1011 | structure with the following setting (modify to suit your need): |
1011 | | - {*white}/set {cyan}buflist.format.indent {brown}"${{color:237}}${{if:${{buffer.next_buffer.local_variables.type}}=~^(channel|private)$?├─:└─}}"{reset} |
| 1012 | +{*white}/set {cyan}buflist.format.indent {brown}"${{color:237}}${{if:${{buffer.next_buffer.local_variables.type}}=~^(channel|private)$?├─:└─}}"{reset} |
1012 | 1013 | ''' |
1013 | 1014 |
|
1014 | 1015 | command_completion = '%(plugin_autosort) %(plugin_autosort) %(plugin_autosort) %(plugin_autosort) %(plugin_autosort)' |
|
0 commit comments