4

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

Name
  • 7,689
  • 4
  • 38
  • 84
  • 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 06 '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 06 '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 06 '15 at 12:44

1 Answers1

6

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

Dan
  • 32,584
  • 6
  • 98
  • 168