infinite 2d grid in an Editor Window

Having trouble with what should be a trivial problem.
I have a 10x10 grid rendered into an EditorWindow via GL. I can scroll the grid infinitely and i can zoom it infinitely by multiplying the underlying cells by x2 and wrapping that zoomfactor so it loops back to 1. If i keep the grid at my ‘scrolled’ origin then it all works great.

If i ‘scroll’ the grid, the cells ‘pop’ when they should be smooth everytime the zoom factor loops. So, having realised i needed to apply an offset to compensate for the zoomed origin of the graph, i now have issues with scrolling through it smoothly. It appears to be non-trivial in calculating the cell distance travelled via a modulus.

So…i feel i’m probably going tackling this issue the wrong way and making it more difficult than expected. So the question should be more, how would you do it…so that ultimately it will support framing of a certain region of data and so on and allow the user to smoothly scrolling around, in and out like the softimage editor etc…

Any ideas/insights would be helpful.
thanks

Also, there is no ‘camera’ in the editorwindow so it has to be either manipulation of the GL verts or using Matrix4x4 class and submitting that…both show the same issue. The biggest issue i am having is with the scrolling of the grid. Trying to use something like scrollOffset % cellSize is failing to work when the thing zoomed…regardless of whether the cellSize is a zoomed or unzoomed value.