From 7b1700479745a48379fecd44d5a07a4436cb0444 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Wed, 6 Oct 2010 23:34:52 +0100 Subject: fixed priorities (-1) and position (100) of prompt statusbars --- prompt_info/prompt_replace.pl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'prompt_info') diff --git a/prompt_info/prompt_replace.pl b/prompt_info/prompt_replace.pl index 350d74f..3055afc 100644 --- a/prompt_info/prompt_replace.pl +++ b/prompt_info/prompt_replace.pl @@ -284,8 +284,9 @@ sub replace_prompt_items { # add the new one. _sbar_command('prompt', 'add', 'uberprompt', - qw/-alignment left -before input -priority 0/); + qw/-alignment left -before input -priority '-1'/); + _sbar_command('prompt', 'position', '100'); } sub restore_prompt_items { @@ -295,9 +296,12 @@ sub restore_prompt_items { print "Restoring original prompt" if DEBUG; _sbar_command('prompt', 'add', 'prompt', - qw/-alignment left -before input -priority 0/); + qw/-alignment left -before input -priority '-1'/); _sbar_command('prompt', 'add', 'prompt_empty', - qw/-alignment left -after prompt -priority 0/); + qw/-alignment left -after prompt -priority '-1'/); + + _sbar_command('prompt', 'position', '100'); + } sub _sbar_command { @@ -305,7 +309,7 @@ sub _sbar_command { my $args_str = join ' ', @args; - $args_str .= ' ' if length $args_str; + $args_str .= ' ' if length $args_str && defined $item; my $command = sprintf 'STATUSBAR %s %s %s%s', $bar, $cmd, $args_str, defined($item)?$item:''; -- cgit v1.2.3