emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bar Cursor Still To Narrow on Mac OS X


From: Ben Key
Subject: Re: Bar Cursor Still To Narrow on Mac OS X
Date: Sat, 5 Mar 2011 20:45:15 -0600

Thanks.

I tested the latest change with cursor-type set to (bar . 4) and everything works as expected.  I can now actually see the bar cursor without straining.

Note that with the most recent changes, the cursor is not drawn correctly when the user sets the cursor-type variable to (hbar . HEIGHT).  According to the documentation for the
cursor-type variable, when this form is used, the number after the . is supposed to specify the "height" of the cursor, not the "width."

The function get_specified_cursor_type processes this form by setting the width output parameter to the user specified width.  The value assigned to the width output parameter in
get_specified_cursor_type is eventually used to set the value of the cursor_width parameter when ns_draw_window_cursor is called.

The expectation is that a horizontal bar cursor will be used whose height is set to the user specified height and width is set to be equal to the width of the current glyph at point.  This is what happens in Emacs 23.

The problem with the latest code in ns_draw_window_cursor is that the user specified value for the cursor "height" is currently also being used for the cursor "width."  As a result, when
cursor-type is set to (hbar . 4) the result is a 4 pixel by 4 pixel block, not a block that is 4 pixels tall and as wide as the current glyph at point.

I am working on a patch that fixes this problem.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]