File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
crates/cmd_prompt/src/actions/actions Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -70,22 +70,21 @@ pub fn write_char(
7070
7171pub fn submit (
7272 input : In < ConsoleActionSystemInput > ,
73- mut query : Query < (
74- & mut ConsoleBuffer ,
75- & mut ConsoleInputText ,
76- & ConsoleAssetHandle < ConsoleHistory > ,
77- ) > ,
73+ mut query : Query < ( & mut ConsoleInputText , & ConsoleAssetHandle < ConsoleHistory > ) > ,
7874 mut assets : ResMut < Assets < ConsoleHistory > > ,
7975 mut commands : Commands ,
8076) {
81- if let Ok ( ( mut buffer , mut input_text, history_handle) ) = query. get_mut ( input. console_id ) {
77+ if let Ok ( ( mut input_text, history_handle) ) = query. get_mut ( input. console_id ) {
8278 let history = assets. get_mut ( history_handle. as_asset_id ( ) ) ;
8379 if history. is_none ( ) {
8480 error ! ( "Failed to get console history!" ) ;
8581 return ;
8682 }
8783 let history = history. unwrap ( ) ;
88- buffer. write ( "\n " ) . unwrap ( ) ;
84+ commands. write_message ( ConsoleWriteMsg {
85+ message : "\n " . to_string ( ) ,
86+ console_id : input. console_id ,
87+ } ) ;
8988 if let Some ( event) = SubmitEvent :: new ( input. console_id , input_text. text . clone ( ) ) {
9089 commands. trigger ( event) ;
9190 } else {
You can’t perform that action at this time.
0 commit comments