<commit_before>define([ 'underscore', 'widgy.backbone', 'components/widget/component' ], function(_, Backbone, widget) {

  var TabbedView = widget.View.extend({
    events: Backbone.extendEvents(widget.View, {
      'click .tabbed > .widget > .node_children .drag-row': 'showTab'
    }),

    showTab: function(event) {
      var view = this.list.findByEl($(event.target).parents('.node')[0]);

      this.$current.html(view.$preview);
      this.$current.append(view.$children);

      return false;
    },

    renderPromise: function() {
      return widget.View.prototype.renderPromise.apply(this, arguments).then(function(view) {
        view.$current = view.$('.current:last');
      });
    }
  });

  return _.extend({}, widget, {
    View: TabbedView
  });
});
<commit_msg>renderPromise must return a promise for the view itself<commit_after>define([ 'underscore', 'widgy.backbone', 'components/widget/component' ], function(_, Backbone, widget) {

  var TabbedView = widget.View.extend({
    events: Backbone.extendEvents(widget.View, {
      'click .tabbed > .widget > .node_children .drag-row': 'showTab'
    }),

    showTab: function(event) {
      var view = this.list.findByEl($(event.target).parents('.node')[0]);

      this.$current.html(view.$preview);
      this.$current.append(view.$children);

      return false;
    },

    renderPromise: function() {
      return widget.View.prototype.renderPromise.apply(this, arguments).then(function(view) {
        view.$current = view.$('.current:last');
        return view;
      });
    }
  });

  return _.extend({}, widget, {
    View: TabbedView
  });
});

{'fraction_non_alphanumeric': 0.1712707182320442, 'fraction_numerical': 0.0012277470841006752, 'mean_word_length': 3.255874673629243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1081738', 'n_tokens_mistral': 505, 'n_tokens_neox': 490, 'n_words': 88}