| 1164 | } |
| 1165 | |
| 1166 | int Document::FindColumn(int line, int column) { |
| 1167 | int position = LineStart(line); |
| 1168 | if ((line >= 0) && (line < LinesTotal())) { |
| 1169 | int columnCurrent = 0; |
| 1170 | while ((columnCurrent < column) && (position < Length())) { |
| 1171 | char ch = cb.CharAt(position); |
| 1172 | if (ch == '\t') { |
| 1173 | columnCurrent = NextTab(columnCurrent, tabInChars); |
| 1174 | if (columnCurrent > column) |
| 1175 | return position; |
| 1176 | position++; |
| 1177 | } else if (ch == '\r') { |
| 1178 | return position; |
| 1179 | } else if (ch == '\n') { |
| 1180 | return position; |
| 1181 | } else { |
| 1182 | columnCurrent++; |
| 1183 | position = NextPosition(position, 1); |
| 1184 | } |
| 1185 | } |
| 1186 | } |
| 1187 | return position; |
| 1188 | } |
| 1189 | |
| 1190 | void Document::Indent(bool forwards, int lineBottom, int lineTop) { |
| 1191 | // Dedent - suck white space off the front of the line to dedent by equivalent of a tab |
no test coverage detected