mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-14 22:45:38 +08:00
builtin commandline: remove redundant function calls
This commit is contained in:
parent
e0bbeb647b
commit
1696b1527a
@ -416,7 +416,7 @@ pub fn commandline(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr])
|
||||
}
|
||||
|
||||
if search_mode {
|
||||
return if commandline_get_state().search_mode {
|
||||
return if rstate.search_mode {
|
||||
STATUS_CMD_OK
|
||||
} else {
|
||||
STATUS_CMD_ERROR
|
||||
@ -424,7 +424,7 @@ pub fn commandline(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr])
|
||||
}
|
||||
|
||||
if paging_mode {
|
||||
return if commandline_get_state().pager_mode {
|
||||
return if rstate.pager_mode {
|
||||
STATUS_CMD_OK
|
||||
} else {
|
||||
STATUS_CMD_ERROR
|
||||
@ -432,8 +432,7 @@ pub fn commandline(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr])
|
||||
}
|
||||
|
||||
if paging_full_mode {
|
||||
let state = commandline_get_state();
|
||||
return if state.pager_mode && state.pager_fully_disclosed {
|
||||
return if rstate.pager_mode && rstate.pager_fully_disclosed {
|
||||
STATUS_CMD_OK
|
||||
} else {
|
||||
STATUS_CMD_ERROR
|
||||
@ -465,7 +464,7 @@ pub fn commandline(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr])
|
||||
let transient;
|
||||
|
||||
if search_field_mode {
|
||||
let Some((search_field_text, cursor_pos)) = commandline_get_state().search_field else {
|
||||
let Some((search_field_text, cursor_pos)) = rstate.search_field else {
|
||||
return STATUS_CMD_ERROR;
|
||||
};
|
||||
transient = search_field_text;
|
||||
|
Loading…
x
Reference in New Issue
Block a user