# HG changeset patch # User Kim F. Storm # Date 1015022420 0 # Node ID 7755c5d1d8b453627498f0336dc668bf42022422 # Parent 8a5d6239662cd913b3a1518becadb38668a73a74 (x_display_and_set_cursor): Blink box cursor using hollow box cursor. Blink bar cursor using 1 pixel wide bar. diff -r 8a5d6239662c -r 7755c5d1d8b4 src/w32term.c --- a/src/w32term.c Fri Mar 01 22:37:16 2002 +0000 +++ b/src/w32term.c Fri Mar 01 22:40:20 2002 +0000 @@ -9759,8 +9759,6 @@ else new_cursor_type = HOLLOW_BOX_CURSOR; } - else if (w->cursor_off_p) - new_cursor_type = NO_CURSOR; else { struct buffer *b = XBUFFER (w->buffer); @@ -9770,6 +9768,15 @@ else new_cursor_type = x_specified_cursor_type (b->cursor_type, &new_cursor_width); + if (w->cursor_off_p) + { + if (new_cursor_type == FILLED_BOX_CURSOR) + new_cursor_type = HOLLOW_BOX_CURSOR; + else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1) + new_cursor_width = 1; + else + new_cursor_type = NO_CURSOR; + } } } @@ -9780,7 +9787,9 @@ && (!on || w->phys_cursor.x != x || w->phys_cursor.y != y - || new_cursor_type != w->phys_cursor_type)) + || new_cursor_type != w->phys_cursor_type) + || (new_cursor_type == BAR_CURSOR + && new_cursor_width != w->phys_cursor_width))) x_erase_phys_cursor (w); /* If the cursor is now invisible and we want it to be visible, @@ -9805,9 +9814,13 @@ x_erase_phys_cursor (w); new_cursor_type = w->phys_cursor_type = NO_CURSOR; + w->phys_cursor_width = -1; } else - w->phys_cursor_type = new_cursor_type; + { + w->phys_cursor_type = new_cursor_type; + w->phys_cursor_width = new_cursor_width; + } w->phys_cursor_on_p = 1; diff -r 8a5d6239662c -r 7755c5d1d8b4 src/xterm.c --- a/src/xterm.c Fri Mar 01 22:37:16 2002 +0000 +++ b/src/xterm.c Fri Mar 01 22:40:20 2002 +0000 @@ -11640,8 +11640,6 @@ else new_cursor_type = HOLLOW_BOX_CURSOR; } - else if (w->cursor_off_p) - new_cursor_type = NO_CURSOR; else { struct buffer *b = XBUFFER (w->buffer); @@ -11651,6 +11649,15 @@ else new_cursor_type = x_specified_cursor_type (b->cursor_type, &new_cursor_width); + if (w->cursor_off_p) + { + if (new_cursor_type == FILLED_BOX_CURSOR) + new_cursor_type = HOLLOW_BOX_CURSOR; + else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1) + new_cursor_width = 1; + else + new_cursor_type = NO_CURSOR; + } } } @@ -11661,7 +11668,9 @@ && (!on || w->phys_cursor.x != x || w->phys_cursor.y != y - || new_cursor_type != w->phys_cursor_type)) + || new_cursor_type != w->phys_cursor_type + || (new_cursor_type == BAR_CURSOR + && new_cursor_width != w->phys_cursor_width))) x_erase_phys_cursor (w); /* If the cursor is now invisible and we want it to be visible, @@ -11678,6 +11687,7 @@ w->phys_cursor.hpos = hpos; w->phys_cursor.vpos = vpos; w->phys_cursor_type = new_cursor_type; + w->phys_cursor_width = new_cursor_width; w->phys_cursor_on_p = 1; switch (new_cursor_type)