Skip to content

Cm5Editor.findPosH method

Cm5Editor › findPosH

Unofficial

Finds the target position for horizontal cursor motion.

Signature:

findPosH(start: Position, amount: number, unit: string, visually: boolean): Cm5FindPosResult

Parameters:

ParameterTypeDescription
startPositionThe starting position.
amountnumberThe number of units to move (may be negative).
unitstringThe unit ("char", "column", or "word").
visuallybooleanWhether motion should be visual rather than logical.

Returns: Cm5FindPosResultThe target position, with hitSide set if the edge was reached.