 				let str      = storage.string
 				let idx      = str.startIndex
 				let end      = str.index(idx, offsetBy: visindex)
-				return storage.string.lineCount(from: idx, to: end)
+				return storage.lineCount(from: idx, to: end)
 			} else {
 				return 0
 			}

		mForegroundTextColor		= nil
		mBackgroundTextColor		= nil
		mFont				= CNFont.systemFont(ofSize: CNFont.systemFontSize)
		mStringAttribute		= CNStringAttribute(width: 80, height: 25)
		super.init(frame: frameRect)
	}



				storage.beginEditing()
				for code in codes {
					mTerminalInfo.foregroundColor = foregroundTextColor
					mTerminalInfo.backgroundColor = backgroundTextColor
					let base = storage.string.index(storage.string.startIndex, offsetBy: verticalOffset())
					if let newidx = storage.execute(base:			base,
									index:			curidx,
									font:			mFont,
									terminalInfo: 		mTerminalInfo,
									escapeCode: code) {
						curidx = newidx
					} else {
