Reference horizontal (X) position for vertical movement. Relative to the input's top-left corner.
To make sure that vertical navigation via up/down arrows stays in the same column as it traverses lines of
varying width, a reference position is saved to match the visual position of the last column. This is then
used to match against characters on adjacent lines to find the one that is the closest. This ensures that
even if cursor travels a large vertical distance, it stays close to the original horizontal position,
without sliding to the left or right in the process.
horizontalAnchor is updated any time the cursor moves horizontally, including mouse navigation.
Reference horizontal (X) position for vertical movement. Relative to the input's top-left corner.
To make sure that vertical navigation via up/down arrows stays in the same column as it traverses lines of varying width, a reference position is saved to match the visual position of the last column. This is then used to match against characters on adjacent lines to find the one that is the closest. This ensures that even if cursor travels a large vertical distance, it stays close to the original horizontal position, without sliding to the left or right in the process.
horizontalAnchor is updated any time the cursor moves horizontally, including mouse navigation.