<commit_before>kd          = require 'kd'
KDSplitView = kd.SplitView


module.exports = class IDEBaseSplitView extends KDSplitView

  viewAppended: ->

    super

    @lastKnownFileTreeSize = @getOption('sizes').first or 250

    @on 'PanelDidResize', kd.utils.debounce 10, =>

      return  unless fileTree = @panels.first
      @lastKnownFileTreeSize = fileTree.size


  _resizePanels: ->

    first = @lastKnownFileTreeSize
    second = @size - @lastKnownFileTreeSize

    @sizes = [ first, second ]

    # last `yes` is to force render second pane
    # even if the first pane reaches the value.
    @resizePanel first, 0, kd.noop, yes

<commit_msg>Resize first split view while file tree's is resizing.<commit_after>kd          = require 'kd'
KDSplitView = kd.SplitView


module.exports = class IDEBaseSplitView extends KDSplitView


  viewAppended: ->

    super

    @lastKnownFileTreeSize = @getOption('sizes').first or 250

    @on 'PanelDidResize', kd.utils.debounce 10, =>
      return  unless fileTree = @panels.first
      @lastKnownFileTreeSize = fileTree.size

    @resizer.on 'DragInAction', => @getFirstSplitView()?._windowDidResize()


  _resizePanels: ->

    first = @lastKnownFileTreeSize
    second = @size - @lastKnownFileTreeSize

    @sizes = [ first, second ]

    # last `yes` is to force render second pane
    # even if the first pane reaches the value.
    @resizePanel first, 0, kd.noop, yes


  getFirstSplitView: ->

    { first } = @panels.last.getSubViews().first.getSubViews()

    return first  if first instanceof KDSplitView


{'fraction_non_alphanumeric': 0.09648562300319488, 'fraction_numerical': 0.0076677316293929714, 'mean_word_length': 3.1871657754010694, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4142833', 'n_tokens_mistral': 540, 'n_tokens_neox': 484, 'n_words': 132}