Simplify cursor color handling
This commit is contained in:
		
							parent
							
								
									29f341da7c
								
							
						
					
					
						commit
						1911c9274d
					
				
							
								
								
									
										30
									
								
								x.c
								
								
								
								
							
							
						
						
									
										30
									
								
								x.c
								
								
								
								
							| 
						 | 
					@ -1418,25 +1418,19 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE;
 | 
						g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (IS_SET(MODE_REVERSE)) {
 | 
						if (selected(cx, cy)) {
 | 
				
			||||||
		g.mode |= ATTR_REVERSE;
 | 
							g.bg = defaultrcs;
 | 
				
			||||||
		g.bg = defaultfg;
 | 
							g.fg = defaultfg;
 | 
				
			||||||
		if (selected(cx, cy)) {
 | 
					 | 
				
			||||||
			drawcol = dc.col[defaultcs];
 | 
					 | 
				
			||||||
			g.fg = defaultrcs;
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			drawcol = dc.col[defaultrcs];
 | 
					 | 
				
			||||||
			g.fg = defaultcs;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		if (selected(cx, cy)) {
 | 
							g.bg = defaultcs;
 | 
				
			||||||
			g.fg = defaultfg;
 | 
							g.fg = defaultbg;
 | 
				
			||||||
			g.bg = defaultrcs;
 | 
						}
 | 
				
			||||||
		} else {
 | 
						drawcol = dc.col[g.bg];
 | 
				
			||||||
			g.fg = defaultbg;
 | 
					
 | 
				
			||||||
			g.bg = defaultcs;
 | 
						if (IS_SET(MODE_REVERSE)) {
 | 
				
			||||||
		}
 | 
							drawcol.color.red = ~drawcol.color.red;
 | 
				
			||||||
		drawcol = dc.col[g.bg];
 | 
							drawcol.color.green = ~drawcol.color.green;
 | 
				
			||||||
 | 
							drawcol.color.blue = ~drawcol.color.blue;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* draw the new one */
 | 
						/* draw the new one */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue