GNOME Bugzilla – Bug 429278
Cursor drawn strangely in joe
Last modified: 2008-12-07 02:52:17 UTC
[ Forwarded from http://bugs.debian.org/418699 ] "When I have the editor "joe" open my caret is supposed to look like a block: ===== ===== ===== ===== ===== Now, when I press page up/down in exactly the right moment when the blinking caret is just about to reappear, it's drawn incomplete for the first blinking, after going away and coming back it's fine. Sometimes, it'll be drawn like this: ===== ===== ===== ===== or = or = or various other strange shapes. = = === ===== _____ === ===== This is just somewhat irritating and may point to a deeper bug with locking drawing onto the surface, but who knows. It doesn't seem to happen when just moving up/down so this seems to indicate that it may be due to the redraw delay." A screen capture of the problem is available here, http://johannes.sipsolutions.net/files/broken-cursor.ogg This could be related to bug 424992, but I'm not sure.
Please explain to a vim user how to configure and reproduce this in joe. That is can you provide a config file(?), instructions on how to run joe with that configuration and an exact sequence of steps to trigger it (do I need to have a file loaded? and how would I do that? etc) Alternatively, you can run your session under 'script -t joe.script 2>joe.timings' which will capture all the data sent to the screen and the exact interval between outputs. Then you check that the script has captured the bug with 'scriptreplay joe.timings joe.script' Thanks.
with script it doesn't seem to reproduce. All I do in joe is start joe (no config file necessary) with, for example, the file linux/drivers/usb/input/hid-core.c. It does seem to be slightly dependent on the file, this one usually triggers the problem easily. Grab the file from http://git.kernel.org/?p=linux/kernel/git/linville/wireless-dev.git;a=blob_plain;f=drivers/usb/input/hid-core.c;hb=HEAD then open it in joe and move to the end of line 1025. Then, push "page down" once and when the cursor is about to light up again, press "page up". Go down again if it didn't work and get the timing a tad different.
Thanks I was able to reproduce this issue following your steps. Watching the updates, it appears that joe only invalidates regions of the screen that have changed and the bug only occurs when that overlaps the cursor during the blink state. Another bug that is visible within joe, is that sometimes we draw a solid white background when it should be using the default background colour, in this case an image.
Good. Or maybe not so good in that there actually is a bug. I have a black background and never see it drawing solid white, so maybe that other bug only happens with an image background?
Good to see this bug in Chris's hands finally.. I've been having this problem in vim and shell, but only got narrow tall cursors, not strange shapes.
Benjamin pointed out that the screen capture is actually a gif since it was done with byzanz. If you have trouble playing it just rename it to .gif, I've symlinked a copy at http://johannes.sipsolutions.net/files/broken-cursor.gif
Ok this is the same underlying problem as bug 440475 - whereby the regions are not cell aligned after the expansion.
I spent a bit of time visualising the regions and their expanded/painted counterparts and finally found another stupid arithmetic mistake inside vte_terminal_expand_region(). I've lost count on the number I've made in there. :-( I've commited a fix in r1899: 2007-05-23 Chris Wilson <chris@chris-wilson.co.uk> Bug 429278 – Cursor drawn strangely in joe * src/vte.c (vte_terminal_expand_region), (vte_terminal_paint_area): Ensure the expanded regions are cell aligned. Could you give it a whirl and see if you can spot any more rendering glitches? Thanks.
Setting to NEEDINFO.
Pretty sure this is fixed.