mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 06:55:34 +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 {
|
if search_mode {
|
||||||
return if commandline_get_state().search_mode {
|
return if rstate.search_mode {
|
||||||
STATUS_CMD_OK
|
STATUS_CMD_OK
|
||||||
} else {
|
} else {
|
||||||
STATUS_CMD_ERROR
|
STATUS_CMD_ERROR
|
||||||
@ -424,7 +424,7 @@ pub fn commandline(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if paging_mode {
|
if paging_mode {
|
||||||
return if commandline_get_state().pager_mode {
|
return if rstate.pager_mode {
|
||||||
STATUS_CMD_OK
|
STATUS_CMD_OK
|
||||||
} else {
|
} else {
|
||||||
STATUS_CMD_ERROR
|
STATUS_CMD_ERROR
|
||||||
@ -432,8 +432,7 @@ pub fn commandline(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if paging_full_mode {
|
if paging_full_mode {
|
||||||
let state = commandline_get_state();
|
return if rstate.pager_mode && rstate.pager_fully_disclosed {
|
||||||
return if state.pager_mode && state.pager_fully_disclosed {
|
|
||||||
STATUS_CMD_OK
|
STATUS_CMD_OK
|
||||||
} else {
|
} else {
|
||||||
STATUS_CMD_ERROR
|
STATUS_CMD_ERROR
|
||||||
@ -465,7 +464,7 @@ pub fn commandline(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr])
|
|||||||
let transient;
|
let transient;
|
||||||
|
|
||||||
if search_field_mode {
|
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;
|
return STATUS_CMD_ERROR;
|
||||||
};
|
};
|
||||||
transient = search_field_text;
|
transient = search_field_text;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user