<commit_before>function file_list_sort(name, elem)
{
  if (!ui.env.folder)
    return;

  if (ui.env.sort_column == name)
    ui.env.sort_reverse = !ui.env.sort_reverse;
  else
    ui.env.sort_reverse = 0;
  ui.env.sort_column = name;

  var td = $(elem);

  $('td', td.parent()).removeClass('sorted reverse');
  td.addClass('sorted').removeClass('reverse');

  if (ui.env.sort_reverse)
    td.addClass('reverse');

  ui.file_list(null, {sort: name, reverse: ui.env.sort_reverse});
};
<commit_msg>Fix files list sorting switching<commit_after>function file_list_sort(name, elem)
{
  if (!ui.env.folder)
    return;

  var td = $(elem), reverse = ui.env.sort_reverse;

  if (ui.env.sort_col == name)
    reverse = !reverse;
  else
    reverse = 0;

  $('td', td.parent()).removeClass('sorted reverse');
  td.addClass('sorted').removeClass('reverse');

  if (reverse)
    td.addClass('reverse');

  ui.file_list({sort: name, reverse: reverse});
};

{'fraction_non_alphanumeric': 0.17653276955602537, 'fraction_numerical': 0.0021141649048625794, 'mean_word_length': 3.9842105263157896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4017176', 'n_tokens_mistral': 343, 'n_tokens_neox': 333, 'n_words': 65}