You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow to find beginning and end of line from a specific point
I didn't find an easy way to determine whether the cursor is in the
last prompt line or what the prompt line number even is. And one
cannot assume the prompt line is the last line of the buffer beacuse
vterm is basically a rectangle filling the whole buffer. As a
consequence `(line-number-at-pos (point-max))` _doesn't work_
because `(point-max)` _doesn't work_.
With this patch, it is possible to find the prompt line using:
(line-number-at-pos (vterm--get-beginning-of-line
(vterm--get-cursor-point)))))
And in case the command in prompt is long and wraps into multiple
lines, its end can be found using:
(line-number-at-pos (vterm--get-end-of-line
(vterm--get-cursor-point)))))
0 commit comments