… | |
… | |
129 | # unless $ob; |
129 | # unless $ob; |
130 | # |
130 | # |
131 | # $pl->contr->mark ($ob); |
131 | # $pl->contr->mark ($ob); |
132 | # $pl->reply (undef, (sprintf "Marked item %s", $ob->name, $ob->title)); |
132 | # $pl->reply (undef, (sprintf "Marked item %s", $ob->name, $ob->title)); |
133 | # } else { |
133 | # } else { |
134 | # my $ob = $pl->find_marked_object; |
134 | # my $ob = $pl->mark; |
135 | # |
135 | # |
136 | # $pl->reply (undef, $ob |
136 | # $pl->reply (undef, $ob |
137 | # ? (sprintf "%s %s * is marked.", $ob->name, $ob->title) |
137 | # ? (sprintf "%s %s * is marked.", $ob->name, $ob->title) |
138 | # : "You have no marked object."); |
138 | # : "You have no marked object."); |
139 | # } |
139 | # } |
… | |
… | |
338 | |
338 | |
339 | if (length $from) { |
339 | if (length $from) { |
340 | $item = $ob->find_best_object_match ($from) |
340 | $item = $ob->find_best_object_match ($from) |
341 | or return $ob->message ("rename: could not find a matching item to rename."); |
341 | or return $ob->message ("rename: could not find a matching item to rename."); |
342 | } else { |
342 | } else { |
343 | $item = $ob->find_marked_object |
343 | $item = $ob->mark |
344 | or return $ob->message ("rename: no from name and no marked item found to rename."); |
344 | or return $ob->message ("rename: no from name and no marked item found to rename."); |
345 | } |
345 | } |
346 | |
346 | |
347 | $item->custom_name (length $to ? $to : undef); |
347 | $item->custom_name (length $to ? $to : undef); |
348 | |
348 | |