4

Is there a built-in boolean variable to determine if the cursor is at the end or the beginning of the line?

3
  • 1
    The functions bolp and eolp serve that purpose, but they are specifically concerned with point instead of cursor. In presence of invisible text, the cursor might look like it's at bol (beginning of line), but point might not be there. Do you care about such situations ? – YoungFrog Jul 6 '15 at 11:43
  • @YoungFrog My question was concerned about point, and the answer of Dan is sufficient in my situation. If you know how to handle the cursor I would be happy to learn it. – Name Jul 6 '15 at 11:57
  • My solution would involve skipping invisible text backwards and testing for bolp. I don't know if there's a better/shorter way. – YoungFrog Jul 6 '15 at 12:44
6

You want the functions bolp and eolp for beginning and end, respectively.

1
  • 1
    And the answer to the question is "no", there is no such variable. ;-) – Drew Jul 6 '15 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.