File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -374,11 +374,19 @@ function showMessagesScroller(msg, persist) {
374374
375375 for ( let i = 0 ; i < firstTitleLinePerMsg . length - 1 ; i ++ ) {
376376
377- if ( shownScrollIdxFirst <= firstTitleLinePerMsg [ i ] && shownScrollIdxFirst + LINES_PER_SCREEN > firstTitleLinePerMsg [ i ] ) {
377+ if (
378+ shownScrollIdxFirst
379+ <= firstTitleLinePerMsg [ i ] && firstTitleLinePerMsg [ i ]
380+ < shownScrollIdxFirst + LINES_PER_SCREEN
381+ ) {
378382 shownMsgIdxFirst = i ;
379383 }
380384
381- if ( shownScrollIdxLast >= firstTitleLinePerMsg [ i + 1 ] && shownScrollIdxLast - LINES_PER_SCREEN < firstTitleLinePerMsg [ i + 1 ] ) {
385+ if (
386+ shownScrollIdxLast - LINES_PER_SCREEN
387+ < firstTitleLinePerMsg [ i + 1 ] - 1 && firstTitleLinePerMsg [ i + 1 ] - 1
388+ <= shownScrollIdxLast
389+ ) {
382390 shownMsgIdxLast = i ;
383391 //print(i)
384392 }
You can’t perform that action at this time.
0 commit comments