[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Current column in non-selected (inactive) window.
From: |
Keith David Bershatsky |
Subject: |
Current column in non-selected (inactive) window. |
Date: |
Mon, 17 Sep 2018 18:24:51 -0700 |
I am working on feature requests #17684 (crosshairs) and #22873 (multiple fake
cursors). [Crosshairs changes colors depending upon whether the current column
is odd/even numbered, or beyond the fill-column.]
I was unable to find a built-in way to obtain the current column of point in
the non-selected (inactive) window. I believe the problem is that
current_column and its underling functions use PT and PT_BYTE, which is not the
same as the window_point in the non-selected (inactive) window.
I resolved the issue by creating a new function (nearly identical to
current_column and its underlying functions) that now take an argument for a
particular point of interest, and I am using Fwindow_point to get that
interesting point. I replaced all PT with my particular point of interest, and
in a couple of places, I replaced PT_BYTE with CHAR_TO_BYTE (point_of_interest).
Other than creating those new functions as described above, is there a built-in
mechanism to get the current column in a non-selected (inactive) window?
If nothing exists, perhaps this new feature might be useful to other users in
the future?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Current column in non-selected (inactive) window.,
Keith David Bershatsky <=