Replace `>` with `<`. We counting line numbers relative to the cursor, so if `lnum > cursor` then `retval` has to be `> 0`.