It's just a footgun. Any time you call it you risk the cursor pane being out of viewport. bring_cursor_of_cursor_pane_in_view is always safe and always a safe replacement.
Looks like the timeline was
And I didn't notice that the latter obviates the former. Or perhaps I thought the former was more efficient in some situations, and didn't notice that it can put us in an invalid state.
T2GN62QE2TB76IJYJ4HNR2Z4CP7KB7GOZ5THDZ5RGMJBSAD72MCQC
5AVGY5AP3AFQ7G2M7FHKRY3EWMOXA4T4CR4FBD246XLZU5WNU75AC
UKZIR47FDIFP7TJYR3AKQSL4UAJD47W3MMXDQTMZQDLICXTZ4BVAC
XD43MI5HTDBO7HD4D2KD4U3UUAOJEMDVSJXJR54ZPW2FHCFB7X5AC
4P4AGIIG55VT6Y3JZVZPB756H4N2C6NTVMWCOOGCOSY63K4ILBFAC
PS4OMGY6HULIA73HDLJ3CEQYWFBSY3SXTC55ABFWIV7BQMU7AW6AC
GQBUV2XOMEPMTXMPCBQWGGIUXGQDX77VTGPFIG6YT7G64ASOYHXQC
IUBUKOBFGTLXNHRNYGVN35F5OQISTGQDB27WMS2LXBVVBXCXGUDQC
WO73G45YHL27GXZIQRLFPMIZSOTO7UOUXPOFKBP7APKYLEGYHL7AC
CJ4VCNOZPQSBURPNWCOGJCWPEUI43WTKGJHUJZOYMNGRUPFGVM3QC
IHVD5VZIQU72CGEGWTFVTI6K2VVZYJHUIBW3GLSCDOFFQGZVLV5QC
ZU3HJ6NH26LFY2NWRCCRMXECNEPVR25OJNOFEK5XJ3KYFJUCKQXAC
5HOB5Y6ZDNJ42XMHQ7YWZTUCK4DAJRPYRECDWTKFSXZWQ4ZMMSNAC
FB7L2QQW6L7X4OWANGKN5U4XFLTJ7G3OINZBQEG3ZT53FUIGKAYAC
function bring_cursor_column_on_screen()
local col_sx = left_edge_sx(Cursor_pane.col)
if col_sx < Display_settings.x or col_sx > Display_settings.x + App.screen.width - Display_settings.column_width then
Display_settings.x = math.max(0, col_sx + Display_settings.column_width + Margin_right + Padding_horizontal - App.screen.width)
Display_settings.y = 0
end
end