bump in statusline
Reported by totte via irc
What steps will reproduce the problem?
When moving the text cursor up and down the statusline changes (line/column/etc), resulting in a "bump" above the character that changed. The problem only becomes apparent when a char changes in the statusline, and forcing a full redraw (e.g. resize) seems to draw the contents properly.
I've included a screenshot, look at the "1%" in the statusline, the fontsize is larger in order to make this more aparent, but the spill over the charater seems to be independant of the font size.
Apparently whenever we are redrawing a char, the text background is spilling outside the statusline. i.e. we are painting the background at the wrong coordinates (or the previous paint was at the wrong coordinates).
Internally the coordinates for the filling of the background are calculated at:
- gui_mch_draw_string() for text background
- VimWrapper::mapText() and ::mapBlock()
Interestingly enough there seems to be a bug in VimWrapper::mapBlock() where the bottom right corner of the block seems to be one pixel too long.
br.setX( br.x()-1 ); - br.setY( br.y() ); + br.setY( br.y()-1 );
This seems to fix this issue, but makes it hard to explain for 2 reasons 1. I was expecting an extra pixel at the top, not the bottom 2. We are not consistent across all operations, i.e. this bug would have gone mostly unnonticed if the extra pixel was added to all operations
From some quick tests I can already establish that gui_mch_clear_block paints one more pixel that gui_mch_draw_string, but the order of painting operations that causes this issue to occur is not so clear.