code: def charindex(self, line, char, context):
          
          #Make sure that we have chars and lines to work from
          if len(context.bufferstr) > 0 and len(self._chars) == 0:
              #Add one for the \n that we split on for each line
              self._chars = [ len(x) + 1 for x in context.bufferstr ]
              #Remove the last line break since it doesn't exist
              self._chars[-1] -= 1
  
              #Now we want to add up the number of characters in each line
              #as the lines progress so that it is easy to search for the
              #line of a single character index
              total = 0
              for i in range(len(self._chars)):
                  total += self._chars[i]
                  self._chars[i] = total
          
          return self._chars[line - 1] + char
docs: Determines the absolute character index for the specified line
          and char using the *buffer's* code string.