From 11ea170b873bbf87160db9b8977f92c394122801 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 15 Jul 2014 15:59:10 +0200 Subject: weechat: iset: updver 3.4 → 3.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weechat/perl/iset.pl | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'weechat/perl/iset.pl') diff --git a/weechat/perl/iset.pl b/weechat/perl/iset.pl index 4b922ee..cc2b28d 100644 --- a/weechat/perl/iset.pl +++ b/weechat/perl/iset.pl @@ -1,6 +1,6 @@ # -# Copyright (C) 2008-2013 Sebastien Helleu -# Copyright (C) 2010-2012 Nils Görs +# Copyright (C) 2008-2014 Sebastien Helleu +# Copyright (C) 2010-2014 Nils Görs # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,6 +19,8 @@ # # History: # +# 2014-06-03, nils_2 : +# version 3.5: add new option "use_mute" # 2014-01-30, stfn : # version 3.4: add new options "color_value_diff" and "color_value_diff_selected" # 2014-01-16, luz : @@ -113,7 +115,7 @@ use strict; my $PRGNAME = "iset"; -my $VERSION = "3.4"; +my $VERSION = "3.5"; my $DESCR = "Interactive Set for configuration options"; my $AUTHOR = "Sebastien Helleu "; my $LICENSE = "GPL3"; @@ -968,10 +970,14 @@ sub iset_cmd_cb { $quote = "\"" if ($options_types[$current_line] eq "string"); } - weechat::buffer_set($iset_buffer, "input", "/set ".$options_names[$current_line]." ".$quote.$value.$quote); + my $set_command = "/set"; + $set_command = "/mute " . $set_command if (weechat::config_boolean($options_iset{"use_mute"}) == 1); + + weechat::buffer_set($iset_buffer, "input", $set_command." ".$options_names[$current_line]." ".$quote.$value.$quote); weechat::command($iset_buffer, "/input move_beginning_of_line"); weechat::command($iset_buffer, "/input move_next_word"); weechat::command($iset_buffer, "/input move_next_word"); + weechat::command($iset_buffer, "/input move_next_word") if (weechat::config_boolean($options_iset{"use_mute"}) == 1); weechat::command($iset_buffer, "/input move_next_char"); weechat::command($iset_buffer, "/input move_next_char") if ($quote ne ""); } @@ -1327,6 +1333,10 @@ sub iset_config_init $iset_config_file, $section_look, "show_current_line", "boolean", "show current line in title bar.", "", 0, 0, "on", "on", 0, "", "", "", "", "", ""); + $options_iset{"use_mute"} = weechat::config_new_option( + $iset_config_file, $section_look, + "use_mute", "boolean", "/mute command will be used in input bar", "", 0, 0, + "off", "off", 0, "", "", "", "", "", ""); } sub iset_config_reload_cb -- cgit v1.2.3-70-g09d2