src: Make code more readable, assert function calls that shouldn't fail
src: Make code more readable, assert function calls that shouldn't fail

Should help clarify what the issue is in #1972.

alexherbo2/kakoune,Somasis/kakoune,casimir/kakoune,occivink/kakoune,jjthrash/kakoune,lenormf/kakoune,Somasis/kakoune,jjthrash/kakoune,lenormf/kakoune,occivink/kakoune,Somasis/kakoune,lenormf/kakoune,mawww/kakoune,mawww/kakoune,lenormf/kakoune,alexherbo2/kakoune,jkonecny12/kakoune,jjthrash/kakoune,jjthrash/kakoune,jkonecny12/kakoune,Somasis/kakoune,jkonecny12/kakoune,danr/kakoune,danr/kakoune,casimir/kakoune,jkonecny12/kakoune,occivink/kakoune,mawww/kakoune,casimir/kakoune,danr/kakoune,mawww/kakoune,danr/kakoune,alexherbo2/kakoune,alexherbo2/kakoune,occivink/kakoune,casimir/kakoune