From 2f796222fa3844d3b22ac87024f5a42216375d21 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 15 Oct 2010 00:51:05 +0100 Subject: visual: moved term size out of visual into overlay --- prompt_info/visual.pl | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'prompt_info') diff --git a/prompt_info/visual.pl b/prompt_info/visual.pl index 1413d0d..b29875b 100644 --- a/prompt_info/visual.pl +++ b/prompt_info/visual.pl @@ -30,29 +30,6 @@ my ($term_w, $term_h) = (0, 0); my ($region_start, $region_end) = (0, 0); my $region_content = ''; -sub update_terminal_size { - - my @stty_data = qx/stty -a/; - my $line = $stty_data[0]; - - # linux - # speed 38400 baud; rows 36; columns 126; line = 0; - if ($line =~ m/rows (\d+); columns (\d+);/) { - $term_h = $1; - $term_w = $2; - # osx - # speed 9600 baud; 40 rows; 235 columns; - } elsif ($line =~ m/(\d+) rows; (\d+) columns;/) { - $term_h = $1; - $term_w = $2; - } else { - # guess? - $term_h = 24; - $term_w = 80; - } - - print "Terminal detected as $term_w cols by $term_h rows" if DEBUG; -} sub visual_subcmd_handler { my ($data, $server, $item) = @_; -- cgit v1.2.3