tweak cursor position helper (cf. issue 2621)