- case FCN_NL:
- /* The algorithm is to look for the first unprotected
- * column after column 0 of the following line. Having
- * found that unprotected column, we check whether the
- * cursor-address-at-entry is at or to the right of the
- * LeftMargin AND the LeftMargin column of the found line
- * is unprotected. If this conjunction is true, then
- * we set the found pointer to the address of the LeftMargin
- * column in the found line.
- * Then, we set the cursor address to the found address.
+ case FCN_NL:
+ /* The algorithm is to look for the first unprotected
+ * column after column 0 of the following line. Having
+ * found that unprotected column, we check whether the
+ * cursor-address-at-entry is at or to the right of the
+ * LeftMargin AND the LeftMargin column of the found line
+ * is unprotected. If this conjunction is true, then
+ * we set the found pointer to the address of the LeftMargin
+ * column in the found line.
+ * Then, we set the cursor address to the found address.
+ */
+ i = SetBufferAddress(ScreenLine(ScreenDown(CursorAddress)), 0);
+ j = ScreenInc(WhereAttrByte(CursorAddress));
+ do {
+ if (IsUnProtected(i)) {
+ break;
+ }
+ /* Again (see comment in Home()), this COULD be a problem
+ * with an unformatted screen.
+ */
+ /* If there was a field with only an attribute byte,
+ * we may be pointing to the attribute byte of the NEXT
+ * field, so just look at the next byte.