GNU bug report logs -
#16856
24.3.50; Cursor leaves garbage in fringe (and a request: width of fringes + scroll bar should be full characters)
Previous Next
Reported by: Anders Lindgren <andlind <at> gmail.com>
Date: Sun, 23 Feb 2014 21:41:02 UTC
Severity: normal
Tags: unreproducible
Found in version 24.3.50
Done: Anders Lindgren <andlind <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
For those users who wish to customize the frame width pixelwise to a size such that exact_window_width_line_p will _never_ be true, those users miss out on the joy of seeing the fringe cursor bitmap. While the patch that was applied pursuant to Bug#16856 fixed the problem with the cursor being drawn on top of the fringe (e5015c5d9632a0bf685c093249ae4a7d3e825b13), it does not permit a fringe bitmap to be placed there instead.
If I had it to do all over again, I would have made the following two modifications. [I have not yet experimented with xterm.c and w32term.c to see if the new condition should be added there as well for Emacs platform builds on Windows and X11.]
In window.c, add the following condition to get_phys_cursor_glyph:
/* This modification enables placement of the cursor-in-fringe bitmap when
the window-width is slightly less than `glyph_row->exact_window_width_line_p`.
This modification also prevents drawing the real cursor on the fringe (instead
of using the cursor-in-fringe bitmap) in the above-mentioned circumstance. */
struct frame *f = XFRAME (w->frame);
int frame_char_width = FRAME_COLUMN_WIDTH (f);
int text_area_width = window_box_width (w, TEXT_AREA);
bool cursor_in_fringe_p = w->phys_cursor.x + frame_char_width >= text_area_width;
if (cursor_in_fringe_p)
return NULL;
And, in nsterm.m, modify a section of ns_draw_window_cursor to include the new condition:
if ((phys_cursor_glyph = get_phys_cursor_glyph (w)) == NULL)
{
/* This modification enables placement of the cursor-in-fringe bitmap when
the window-width is slightly less than `glyph_row->exact_window_width_line_p`.
This modification also prevents drawing the real cursor on the fringe (instead
of using the cursor-in-fringe bitmap) in the above-mentioned circumstance. */
int frame_char_width = FRAME_COLUMN_WIDTH (f);
int text_area_width = window_box_width (w, TEXT_AREA);
bool cursor_in_fringe_p = w->phys_cursor.x + frame_char_width >= text_area_width;
if ((glyph_row->exact_window_width_line_p
&& w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA])
|| cursor_in_fringe_p)
{
glyph_row->cursor_in_fringe_p = 1;
draw_fringe_bitmap (w, glyph_row, 0);
}
return;
}
This bug report was last modified 7 years and 192 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.