<commit_before>Range = require 'range'
EventEmitter = require 'event-emitter'
_ = require 'underscore'

module.exports =
class Selection
  wordwise: false
  editSession: null
  initialScreenRange: null
  goalBufferRange: null
  needsAutoscroll: null

  constructor: ({@cursor, @marker, @editSession, @goalBufferRange}) ->
    @cursor.selection = this
    @editSession.observeMarker @marker, => @screenRangeChanged()
    @cursor.on 'destroyed.selection', =>
      @cursor = null
      @destroy()

  destroy: ->
    return if @destroyed
    @destroyed = true
    @editSession.removeSelection(this)
    @trigger 'destroyed' unless @editSession.destroyed
    @cursor?.destroy()
<commit_msg>:lipstick:<commit_after>Range = require 'range'
EventEmitter = require 'event-emitter'
_ = require 'underscore'

module.exports =
class Selection
  cursor: null
  marker: null
  editSession: null
  initialScreenRange: null
  goalBufferRange: null
  wordwise: false
  needsAutoscroll: null

  constructor: ({@cursor, @marker, @editSession, @goalBufferRange}) ->
    @cursor.selection = this
    @editSession.observeMarker @marker, => @screenRangeChanged()
    @cursor.on 'destroyed.selection', =>
      @cursor = null
      @destroy()

  destroy: ->
    return if @destroyed
    @destroyed = true
    @editSession.removeSelection(this)
    @trigger 'destroyed' unless @editSession.destroyed
    @cursor?.destroy()

{'fraction_non_alphanumeric': 0.11579699785561115, 'fraction_numerical': 0.0, 'mean_word_length': 4.128205128205129, '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': '3592643', 'n_tokens_mistral': 422, 'n_tokens_neox': 412, 'n_words': 100}