File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -352,7 +352,8 @@ function showMessagesScroller(msg) {
352352 } ,
353353 select : function ( scrollIdx , touch ) {
354354 if ( touch && touch . type === 2 ) { return ; }
355- const MSG_SELECTED = findSelectedMsg ( scrollIdx ) ;
355+ const MSG_SELECTED_IDX = findSelectedMsgIdx ( scrollIdx ) ;
356+ const MSG_SELECTED = MESSAGES [ MSG_SELECTED_IDX ] ;
356357 WU && WU . show ( ) ;
357358
358359 print ( process . memory ( ) . free ) ;
@@ -411,10 +412,10 @@ function showMessagesScroller(msg) {
411412 //// Helper functions ////
412413
413414 // helper function for message selection
414- let findSelectedMsg = function ( scrollIdx ) {
415+ let findSelectedMsgIdx = function ( scrollIdx ) {
415416 for ( let i = firstTitleLinePerMsg . length - 1 ; i >= 0 ; i -- ) {
416417 if ( scrollIdx >= firstTitleLinePerMsg [ i ] ) {
417- return MESSAGES [ i ] ;
418+ return i ;
418419 }
419420 }
420421 }
You can’t perform that action at this time.
0 commit comments