I am trying to figure out the line numbers referring to the actual selection. What I came up with is something like this
(let ((start (line-number-at-pos (region-beginning))) (end (line-number-at-pos (region-end)))) (ignore))
But if I select whole lines then
(region-end) returns the position of the beginning of the next line instead of the end of the currently selected line.
If I am selecting anything but complete lines then the
(region-end) function works correctly. Is there a way to get the real line number or to figure out whether the user is selecting complete lines or not?
I would like to differentiate between these those: