Actually I think the problem is simpler than I first thought: you are calling window.SwapBuffers() each time you draw a line, when you really should just be calling it once at the end of a frame.
A buffer swap on a modern system means "show the current contents of the framebuffer on the display and give me a new offscreen buffer to draw on". Whether or not this new offscreen buffer is blank or not isn't defined, since the OpenGL standard is to call glClear anyway. A quick C test on my dual boot laptop does have different behaviour for Linux and MS Windows.
So your program draws the first line, swaps the buffers, draws the second line, swaps the buffers again. It looks to me as if the Linux implementation is preserving the frame buffer contents, so your first line is still there when the second line is drawn. On MS Windows I guess that the new frame buffer is cleared, so the first line is "displayed" very very briefly and then overwritten by the second frame buffer with only the second line.