add width changing dx display in console
[spider.git] / cmd / show / dx.pl
index 7e4d3a3587e8d7c655820f5c560dd1d5979130d3..a2c81a17055174b7bf952bce35f744d5859c4269 100644 (file)
@@ -162,7 +162,7 @@ sub handle
   
        # now do the search
 
-       if ($self->{_nospawn}) {
+       if ($self->{_nospawn} || ($Spot::spotcachedays && !$expr && $from == 0 && $fromday == 0 && $today == 0)) {
                my @res = Spot::search($expr, $fromday, $today, $from, $to, $user, $dofilter, $self);
                my $ref;
                my @dx;
@@ -175,7 +175,7 @@ sub handle
                                        push @out, DXCommandmode::format_dx_spot($self, @$ref);
                                }
                                else {
-                                       push @out, Spot::formatl(@$ref);
+                                       push @out, Spot::formatl($self->{width}, @$ref);
                                }
                        }
                }
@@ -197,7 +197,7 @@ sub handle
                                                                                                        push @out, DXCommandmode::format_dx_spot($self, @$ref);
                                                                                                }
                                                                                                else {
-                                                                                                       push @out, Spot::formatl(@$ref);
+                                                                                                       push @out, Spot::formatl($self->{width}, @$ref);
                                                                                                }
                                                                                        }
                                                                                }