Since it is intended that the line number is always positive (and it is in both cases where editor_goto_line()
is called) and the sign is communicated in offset
it is a programming error if line_no < 0
so it should use one of the glib checks that log a warning, eg g_return_val_if_fail()
. Have a look at the usage elsewhere in Geany since Glib doesn't bother to document it any more.
Also its really only needed to check for out of range after the offset calculation, checking before and setting to max will still give an out of range result (for any current line except 0) so no need to check before.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.