{\rtf1\mac\ansicpg10000\cocoartf100 {\fonttbl\f0\fnil\fcharset77 HelveticaNeue;} {\colortbl;\red255\green255\blue255;} \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f0\fs24 \cf0 How ICeCoffEE gets an attributed substring:\ \ Save old 2D selection to oldPt0, oldPt1\ pt1 gets the 1D index\ realPt0, realPt1 get line/column of selection ends\ [adjust height if needed so we don't go beyond the last visible line onscreen]\ set selPt0 to line, selPt1 to next line, both column 0\ get text into realStr\ \ \ set the match range, this gives us from the previous ending to the ending char\ if the range is less than }