bidi.getCaretPosition(lineLength) != XINSET) {
bidi.getCaretPosition(lineLength) != 0) {
void doColumnLeft() {	int line = content.getLineAtOffset(caretOffset);	int lineOffset = content.getOffsetAtLine(line);		int offsetInLine = caretOffset - lineOffset;		if (isBidi()) {		String lineText = content.getLine(line);		int lineLength = lineText.length();		GC gc = new GC(this);		StyledTextBidi bidi = getStyledTextBidi(lineText, lineOffset, gc);				if (horizontalScrollOffset > 0 || offsetInLine > 0) {			if (offsetInLine < lineLength && bidi.isRightToLeft(offsetInLine)) {				// advance caret logically if in R2L segment (move visually left)				caretOffset++;				doSelection(SWT.RIGHT);				if (caretOffset - lineOffset == lineLength) {					// if the line end is reached in a R2L segment, make the 					// caret position (visual left border) visible before 					// jumping to segment start					showCaret();				}				// end of R2L segment reached (visual left side)?				if (bidi.isRightToLeft(caretOffset - lineOffset) == false) {					if (bidi.getCaretPosition(caretOffset - lineOffset) < horizontalScrollOffset) {						// make beginning of R2L segment visible before going 						// left, to L2R segment important if R2L segment ends 						// at visual left in order to scroll all the way to the						// left. Fixes 1GKM3XS						showCaret();					}					// go to beginning of R2L segment (visually end of next L2R					// segment)/beginning of line					caretOffset--;					while (caretOffset - lineOffset > 0 &&						   bidi.isRightToLeft(caretOffset - lineOffset)) {						caretOffset--;					}				}			}			else			if (offsetInLine == lineLength && 				bidi.getCaretPosition(lineLength) != XINSET) {				// at logical line end in R2L segment but there's more text (a				// L2R segment) go to end of R2L segment (visually left of next				// L2R segment)/end of line				caretOffset--;				while (caretOffset - lineOffset > 0 && 					   bidi.isRightToLeft(caretOffset - lineOffset)) {					caretOffset--;				}			}			else			if (offsetInLine > 0 && bidi.isRightToLeft(offsetInLine) == false) {				// decrease caret logically if in L2R segment (move visually left)				caretOffset--;				doSelection(SWT.LEFT);				// end of L2R segment reached (visual left side of preceeding R2L 				// segment)?				if (caretOffset - lineOffset > 0 && 					bidi.isRightToLeft(caretOffset - lineOffset - 1)) {					// go to beginning of R2L segment (visually start of next L2R					// segment)/beginning of line					caretOffset--;					while (caretOffset - lineOffset > 0 &&						   bidi.isRightToLeft(caretOffset - lineOffset - 1)) {						caretOffset--;					}				}			}			// if new caret position is to the left of the client area			if (bidi.getCaretPosition(caretOffset - lineOffset) < horizontalScrollOffset) {				// scroll to the caret position				showCaret();			}			else {				// otherwise just update caret position without scrolling it into view				setCaretLocation();				setBidiKeyboardLanguage();			}			// Beginning of line reached (auto scroll finished) but not scrolled 			// completely to the left? Fixes 1GKM193			if (caretOffset - lineOffset == 0 && horizontalScrollOffset > 0 && 				horizontalScrollOffset <= XINSET) {				scrollHorizontalBar(-horizontalScrollOffset);			}		}		gc.dispose();	}	else	if (offsetInLine > 0) {		caretOffset--;		showCaret();	}}