@@ -159,6 +159,7 @@ void ConditionalCursorMove::apply( Framebuffer &fb, uint64_t confirmed_epoch ) c
159159NotificationEngine::NotificationEngine ()
160160 : last_word_from_server( timestamp() ),
161161 last_acked_state( timestamp() ),
162+ server_addr(),
162163 escape_key_string(),
163164 message(),
164165 message_is_network_error( false ),
@@ -216,8 +217,8 @@ void NotificationEngine::apply( Framebuffer &fb ) const
216217
217218 double since_heard = (double )(now - last_word_from_server) / 1000.0 ;
218219 double since_ack = (double )(now - last_acked_state) / 1000.0 ;
219- const char server_message[] = " contact" ;
220- const char reply_message[] = " reply" ;
220+ const char server_message[] = " contact with " ;
221+ const char reply_message[] = " reply from " ;
221222
222223 double time_elapsed = since_heard;
223224 const char *explanation = server_message;
@@ -235,17 +236,17 @@ void NotificationEngine::apply( Framebuffer &fb ) const
235236 return ;
236237 }
237238 if ( message.empty () && time_expired ) {
238- swprintf ( tmp, 128 , L" mosh: Last %s %s ago.%s" , explanation,
239+ swprintf ( tmp, 128 , L" mosh: Last %s %s %s ago.%s" , explanation, server_addr. c_str () ,
239240 human_readable_duration ( static_cast <int >( time_elapsed ),
240241 " seconds" ).c_str (),
241242 keystroke_str );
242243 } else if ( (!message.empty ()) && (!time_expired) ) {
243244 swprintf ( tmp, 128 , L" mosh: %ls%s" , message.c_str (), keystroke_str );
244245 } else {
245- swprintf ( tmp, 128 , L" mosh: %ls (%s without %s.)%s" , message.c_str (),
246+ swprintf ( tmp, 128 , L" mosh: %ls (%s without %s %s .)%s" , message.c_str (),
246247 human_readable_duration ( static_cast <int >( time_elapsed ),
247248 " s" ).c_str (),
248- explanation, keystroke_str );
249+ explanation, server_addr. c_str (), keystroke_str );
249250 }
250251
251252 wstring string_to_draw ( tmp );
0 commit comments