X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=cb38ebe91e5ea6413a236277effd25475e1d30c4;hp=5ce7426b4f142e7105acdec50cb00d857168010b;hb=62c6bbdc00af3ddd63cdba48f53711fb4214f32c;hpb=c555a037520769fe44012c04b4fe668eb1849b0a diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 5ce7426..cb38ebe 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -651,13 +651,17 @@ var show_line = function(line_num, move_num) { window['show_line'] = show_line; var prev_move = function() { - --current_display_move; + if (current_display_move > 0) { + --current_display_move; + } update_displayed_line(); } window['prev_move'] = prev_move; var next_move = function() { - ++current_display_move; + if (current_display_line && current_display_move < current_display_line.pretty_pv.length - 1) { + ++current_display_move; + } update_displayed_line(); } window['next_move'] = next_move;