It would be good to have a function like $curocc which indicates the position of the current occurrence displayed on the screen. Therefore $screencurocc = 1 is when the current occurrence is at the top of the screen and $screencurocc can be between 1 and $paintedocc
The reason would be for screen handling. For example placing the cursor at the correct occurrence position after a store.
better screen handling