… | |
… | |
2083 | |
2083 | |
2084 | /* |
2084 | /* |
2085 | * C: set the cursor character (s) |
2085 | * C: set the cursor character (s) |
2086 | */ |
2086 | */ |
2087 | { |
2087 | { |
2088 | bool setoldcursor; |
|
|
2089 | |
|
|
2090 | #ifdef CURSOR_BLINK |
2088 | #ifdef CURSOR_BLINK |
2091 | if (hidden_cursor) |
2089 | if (hidden_cursor) |
2092 | showcursor = 0; |
2090 | showcursor = 0; |
2093 | #endif |
2091 | #endif |
2094 | |
2092 | |
… | |
… | |
2145 | scr_set_char_rend (ROW(screen.cur.row), cur_col, rend); |
2143 | scr_set_char_rend (ROW(screen.cur.row), cur_col, rend); |
2146 | } |
2144 | } |
2147 | } |
2145 | } |
2148 | |
2146 | |
2149 | /* make sure no outline cursor is left around */ |
2147 | /* make sure no outline cursor is left around */ |
2150 | setoldcursor = 0; |
|
|
2151 | if (ocrow != -1) |
2148 | if (ocrow != -1) |
2152 | { |
2149 | { |
2153 | if (screen.cur.row - view_start != ocrow |
2150 | if (screen.cur.row - view_start != ocrow |
2154 | || screen.cur.col != oldcursor.col) |
2151 | || screen.cur.col != oldcursor.col) |
2155 | { |
2152 | { |
2156 | if (ocrow < nrow |
2153 | if (ocrow < nrow |
2157 | && oldcursor.col < ncol) |
2154 | && oldcursor.col < ncol) |
2158 | drawn_buf[ocrow].r[oldcursor.col] ^= (RS_RVid | RS_Uline); |
2155 | drawn_buf[ocrow].r[oldcursor.col] ^= (RS_RVid | RS_Uline); |
2159 | |
|
|
2160 | if (focus || !showcursor) |
|
|
2161 | oldcursor.row = -1; |
|
|
2162 | else |
|
|
2163 | setoldcursor = 1; |
|
|
2164 | } |
2156 | } |
2165 | } |
2157 | } |
2166 | else if (!focus) |
|
|
2167 | setoldcursor = 1; |
|
|
2168 | |
2158 | |
2169 | if (setoldcursor) |
2159 | // save the current cursor coordinates if the cursor is visible |
|
|
2160 | // and the window is unfocused, so as to clear the outline cursor |
|
|
2161 | // in the next refresh if the cursor moves |
|
|
2162 | if (showcursor && !focus && screen.cur.row - view_start < nrow) |
2170 | { |
2163 | { |
2171 | if (screen.cur.row - view_start >= nrow) |
|
|
2172 | oldcursor.row = -1; |
|
|
2173 | else |
|
|
2174 | { |
|
|
2175 | oldcursor.row = screen.cur.row - view_start; |
2164 | oldcursor.row = screen.cur.row - view_start; |
2176 | oldcursor.col = screen.cur.col; |
2165 | oldcursor.col = screen.cur.col; |
2177 | } |
|
|
2178 | } |
2166 | } |
|
|
2167 | else |
|
|
2168 | oldcursor.row = -1; |
2179 | } |
2169 | } |
2180 | |
2170 | |
2181 | #ifndef NO_SLOW_LINK_SUPPORT |
2171 | #ifndef NO_SLOW_LINK_SUPPORT |
2182 | /* |
2172 | /* |
2183 | * D: CopyArea pass - very useful for slower links |
2173 | * D: CopyArea pass - very useful for slower links |