<commit_before>'use strict';

$(document).ready(() => {
  let currentIndex = -1,
    prevIndex = -1,
    globalVars,
    specialVars;

  let winHeight = window.innerHeight;
  resizeEditors(editors, winHeight);

  var onResize;
  $(window).on("resize", function() {
    clearTimeout(onResize);
    onResize = setTimeout(function() {
      resizeEditors(setTimeout(function() {
        return window.innerHeight;
      }, 20);
    }, 250);
  });

  disableBackFirstButtons(true);
  $('#step #currStep').text(` 0 `);
  $('#step #lastStep').text(` ${data.log.length - 1} `);

  function changeVars(index) {
    globalVars = data.log[index].variables.global;
    specialVars = data.log[index].variables.special;
    $('#watch-list').empty();
    $('#error-msg').empty();
    for (let keys in globalVars) {
      const value = globalVars[keys] === '_mintyUndefined' ? undefined : globalVars[keys];
      $('#watch-list').append(`<tr><td>${keys}</td><td>${JSON.stringify(value)}</td></tr>`);
    }
    for (let keys in specialVars) {
      const value = specialVars[keys] === '_mintyUndefined' ? undefined : specialVars[keys];
      $('#watch-list').append(`<tr><td>${keys}</td><td>${JSON.stringify(value)}</td></tr>`);
    }
    if (data.log[index].error) {
      $('#error-msg').html(`Error! - ${data.log[index].error}`).css('color', 'red');
    }
  }

  function checkPosition(index) {
    if (index <= 0) {
      disableBackFirstButtons(true);
      disableForwardLastButtons(false);<commit_msg>editor resizes to fill window, when window is resized<commit_after>'use strict';

$(document).ready(() => {
  let currentIndex = -1,
    prevIndex = -1,
    globalVars,
    specialVars;

  let winHeight = window.innerHeight;
  resizeEditors(editors, winHeight);

  var onResize;
  $(window).on("resize", function() {
    clearTimeout(onResize);
    console.log(onResize, window.innerHeight);
    onResize = setTimeout(function() {
      resizeEditors(editors, window.innerHeight);
    }, 250);
  });

  disableBackFirstButtons(true);
  $('#step #currStep').text(` 0 `);
  $('#step #lastStep').text(` ${data.log.length - 1} `);

  function changeVars(index) {
    globalVars = data.log[index].variables.global;
    specialVars = data.log[index].variables.special;
    $('#watch-list').empty();
    $('#error-msg').empty();
    for (let keys in globalVars) {
      const value = globalVars[keys] === '_mintyUndefined' ? undefined : globalVars[keys];
      $('#watch-list').append(`<tr><td>${keys}</td><td>${JSON.stringify(value)}</td></tr>`);
    }
    for (let keys in specialVars) {
      const value = specialVars[keys] === '_mintyUndefined' ? undefined : specialVars[keys];
      $('#watch-list').append(`<tr><td>${keys}</td><td>${JSON.stringify(value)}</td></tr>`);
    }
    if (data.log[index].error) {
      $('#error-msg').html(`Error! - ${data.log[index].error}`).css('color', 'red');
    }
  }

  function checkPosition(index) {
    if (index <= 0) {
      disableBackFirstButtons(true);
      disableForwardLastButtons(false);
{'fraction_non_alphanumeric': 0.20112285336856012, 'fraction_numerical': 0.0059445178335535, 'mean_word_length': 3.8003169572107764, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2218402', 'n_tokens_mistral': 985, 'n_tokens_neox': 1005, 'n_words': 165}