<commit_before>{View} = require 'atom'

module.exports =
class CursorPositionView extends View
  @content: ->
    @div class: 'cursor-position inline-block'

  initialize: (@statusBar) ->
    @subscribe @statusBar, 'active-buffer-changed', @updateCursorPositionText
    @subscribe atom.workspaceView, 'cursor:moved', @updateCursorPositionText

  destroy: ->
    @remove()

  afterAttach: ->
    @updateCursorPositionText()

  updateCursorPositionText: =>
    editor = atom.workspace.getActiveEditor()
    if position = editor?.getCursorBufferPosition()
      @text("#{position.row + 1},#{position.column + 1}").show()
    else
      @hide()<commit_msg>Use a span to hold the cursor position text<commit_after>{View} = require 'atom'

module.exports =
class CursorPositionView extends View
  @content: ->
    @div class: 'cursor-position inline-block', =>
      @span outlet: 'cursorPosition'

  initialize: (@statusBar) ->
    @subscribe @statusBar, 'active-buffer-changed', @updateCursorPositionText
    @subscribe atom.workspaceView, 'cursor:moved', @updateCursorPositionText

  destroy: ->
    @remove()

  afterAttach: ->
    @updateCursorPositionText()

  updateCursorPositionText: =>
    editor = atom.workspace.getActiveEditor()
    if position = editor?.getCursorBufferPosition()
      @cursorPosition.text("#{position.row + 1},#{position.column + 1}").show()
    else
      @cursorPosition.hide()
{'fraction_non_alphanumeric': 0.13451957295373665, 'fraction_numerical': 0.0028469750889679717, 'mean_word_length': 4.265917602996255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, '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': '6589677', 'n_tokens_mistral': 413, 'n_tokens_neox': 401, 'n_words': 86}