Rename Filter action to search
parent
760c1e859d
commit
bae083cc8f
6
meli.1
6
meli.1
|
@ -301,11 +301,11 @@ is a mailbox prefixed with the
|
|||
number in the side menu for the current account
|
||||
.It Cm toggle_thread_snooze
|
||||
don't issue notifications for thread under cursor in thread listing
|
||||
.It Cm filter Ar STRING
|
||||
filter mailbox with
|
||||
.It Cm search Ar STRING
|
||||
search mailbox with
|
||||
.Ar STRING
|
||||
key.
|
||||
Escape exits filter results
|
||||
Escape exits search results
|
||||
.It Cm set read, set unread
|
||||
.It Cm create-mailbox Ar ACCOUNT Ar MAILBOX_PATH
|
||||
create mailbox with given path.
|
||||
|
|
|
@ -773,7 +773,7 @@ impl Component for Listing {
|
|||
{
|
||||
context
|
||||
.replies
|
||||
.push_back(UIEvent::ExInput(Key::Paste("filter ".to_string())));
|
||||
.push_back(UIEvent::ExInput(Key::Paste("search ".to_string())));
|
||||
context
|
||||
.replies
|
||||
.push_back(UIEvent::ChangeMode(UIMode::Execute));
|
||||
|
|
|
@ -1354,14 +1354,11 @@ impl Component for CompactListing {
|
|||
self.set_dirty(true);
|
||||
return true;
|
||||
}
|
||||
UIEvent::Action(ref action) => match action {
|
||||
Action::Listing(Filter(ref filter_term)) if !self.unfocused => {
|
||||
UIEvent::Action(Action::Listing(Search(ref filter_term))) if !self.unfocused => {
|
||||
self.filter(filter_term, context);
|
||||
self.dirty = true;
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
|
|
@ -1291,7 +1291,7 @@ impl Component for ConversationsListing {
|
|||
self.dirty = true;
|
||||
}
|
||||
UIEvent::Action(ref action) => match action {
|
||||
Action::Listing(Filter(ref filter_term)) if !self.unfocused => {
|
||||
Action::Listing(Search(ref filter_term)) if !self.unfocused => {
|
||||
self.filter(filter_term, context);
|
||||
self.dirty = true;
|
||||
return true;
|
||||
|
|
|
@ -1180,7 +1180,7 @@ impl Component for PlainListing {
|
|||
self.refresh_mailbox(context, false);
|
||||
return true;
|
||||
}
|
||||
UIEvent::Action(Action::Listing(Filter(ref filter_term))) if !self.unfocused => {
|
||||
UIEvent::Action(Action::Listing(Search(ref filter_term))) if !self.unfocused => {
|
||||
self.filter(filter_term, context);
|
||||
self.dirty = true;
|
||||
}
|
||||
|
|
|
@ -755,7 +755,7 @@ impl Component for Pager {
|
|||
))));
|
||||
return true;
|
||||
}
|
||||
UIEvent::Action(Action::Listing(ListingAction::Filter(pattern))) => {
|
||||
UIEvent::Action(Action::Listing(ListingAction::Search(pattern))) => {
|
||||
self.search = Some(SearchPattern {
|
||||
pattern: pattern.to_string(),
|
||||
positions: vec![],
|
||||
|
@ -1962,7 +1962,7 @@ impl Component for Tabbed {
|
|||
);
|
||||
}
|
||||
}
|
||||
UIEvent::Action(Action::Listing(ListingAction::Filter(pattern)))
|
||||
UIEvent::Action(Action::Listing(ListingAction::Search(pattern)))
|
||||
if self.show_shortcuts =>
|
||||
{
|
||||
self.help_search = Some(SearchPattern {
|
||||
|
@ -2014,7 +2014,7 @@ impl Component for Tabbed {
|
|||
{
|
||||
context
|
||||
.replies
|
||||
.push_back(UIEvent::ExInput(Key::Paste("filter ".to_string())));
|
||||
.push_back(UIEvent::ExInput(Key::Paste("search ".to_string())));
|
||||
context
|
||||
.replies
|
||||
.push_back(UIEvent::ChangeMode(UIMode::Execute));
|
||||
|
|
|
@ -134,14 +134,14 @@ define_commands!([
|
|||
);
|
||||
)
|
||||
},
|
||||
{ tags: ["filter"],
|
||||
desc: "filter <TERM>, filters list with given term",
|
||||
{ tags: ["search"],
|
||||
desc: "search <TERM>, searches list with given term",
|
||||
parser:(
|
||||
named!(filter<Action>,
|
||||
named!(search<Action>,
|
||||
do_parse!(
|
||||
ws!(tag!("filter"))
|
||||
ws!(tag!("search"))
|
||||
>> string: map_res!(call!(not_line_ending), std::str::from_utf8)
|
||||
>> (Listing(Filter(String::from(string))))
|
||||
>> (Listing(Search(String::from(string))))
|
||||
)
|
||||
);
|
||||
)
|
||||
|
@ -424,7 +424,7 @@ named!(
|
|||
|
||||
named!(
|
||||
listing_action<Action>,
|
||||
alt_complete!(toggle | envelope_action | filter | toggle_thread_snooze | open_in_new_tab | tag)
|
||||
alt_complete!(toggle | envelope_action | search | toggle_thread_snooze | open_in_new_tab | tag)
|
||||
);
|
||||
|
||||
named!(
|
||||
|
|
|
@ -43,7 +43,7 @@ pub enum ListingAction {
|
|||
SetThreaded,
|
||||
SetCompact,
|
||||
SetConversations,
|
||||
Filter(String),
|
||||
Search(String),
|
||||
SetSeen,
|
||||
SetUnseen,
|
||||
Delete,
|
||||
|
|
Loading…
Reference in New Issue