     top = targetRow * @lineHeightInPixels
     left = 0
     column = 0
-    for token in @tokenizedLineForScreenRow(targetRow).tokens
-      charWidths = @getScopedCharWidths(token.scopes)
+
+    iterator = TokenIterator.instance.reset(@tokenizedLineForScreenRow(targetRow))
+    while iterator.next()
+      charWidths = @getScopedCharWidths(iterator.getScopes())
       valueIndex = 0
-      while valueIndex < token.value.length
-        if token.hasPairedCharacter
-          char = token.value.substr(valueIndex, 2)
+      value = iterator.getText()
+      while valueIndex < value.length
+        if iterator.isPairedCharacter()
+          char = value
           charLength = 2
           valueIndex += 2
         else
-          char = token.value[valueIndex]
+          char = value[valueIndex]
           charLength = 1
           valueIndex++
 

Serializable = require 'serializable'
{CompositeDisposable, Emitter} = require 'event-kit'
{Point, Range} = require 'text-buffer'
TokenizedBuffer = require './tokenized-buffer'
RowMap = require './row-map'
Fold = require './fold'
Model = require './model'
Token = require './token'
Decoration = require './decoration'
Marker = require './marker'
Grim = require 'grim'

class BufferToScreenConversionError extends Error
  constructor: (@message, @metadata) ->


    left = 0
    column = 0

    iterator = TokenIterator.instance.reset(@tokenizedLineForScreenRow(row))
    while iterator.next()
      charWidths = @getScopedCharWidths(iterator.getScopes())
      value = iterator.getText()
      valueIndex = 0
      while valueIndex < value.length
        if iterator.isPairedCharacter()
          char = value
          charLength = 2
          valueIndex += 2
        else
          char = value[valueIndex]
          charLength = 1
          valueIndex++

