mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 01:34:18 +00:00 
			
		
		
		
	If the terminal supports sitm for italics, use it instead of standout
(smso). From Tiago Resende.
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
				
			|||||||
# $Id: configure.ac,v 1.15 2011-02-11 23:31:15 nicm Exp $
 | 
					# $Id: configure.ac,v 1.16 2011-04-09 07:48:58 nicm Exp $
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Miscellaneous autofoo bullshit.
 | 
					# Miscellaneous autofoo bullshit.
 | 
				
			||||||
AC_INIT(tmux, 1.5)
 | 
					AC_INIT(tmux, 1.5)
 | 
				
			||||||
@@ -101,7 +101,7 @@ AC_MSG_RESULT($found_glibc)
 | 
				
			|||||||
AC_CHECK_LIB(rt, clock_gettime)
 | 
					AC_CHECK_LIB(rt, clock_gettime)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Look for libevent.
 | 
					# Look for libevent.
 | 
				
			||||||
AC_SEARCH_LIBS(event_init, event, found_libevent=yes, found_libevent=no)
 | 
					AC_SEARCH_LIBS(event_init, [event event-1.4 event2], found_libevent=yes, found_libevent=no)
 | 
				
			||||||
if test "x$found_libevent" = xno; then
 | 
					if test "x$found_libevent" = xno; then
 | 
				
			||||||
    AC_MSG_ERROR("libevent not found")
 | 
					    AC_MSG_ERROR("libevent not found")
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tmux.h
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: tmux.h,v 1.618 2011-04-06 22:29:26 nicm Exp $ */
 | 
					/* $Id: tmux.h,v 1.619 2011-04-09 07:48:58 nicm Exp $ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
					 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
				
			||||||
@@ -319,6 +319,7 @@ enum tty_code_code {
 | 
				
			|||||||
	TTYC_SMKX,	/* keypad_xmit, ks */
 | 
						TTYC_SMKX,	/* keypad_xmit, ks */
 | 
				
			||||||
	TTYC_SMSO,	/* enter_standout_mode, so */
 | 
						TTYC_SMSO,	/* enter_standout_mode, so */
 | 
				
			||||||
	TTYC_SMUL,	/* enter_underline_mode, us */
 | 
						TTYC_SMUL,	/* enter_underline_mode, us */
 | 
				
			||||||
 | 
						TTYC_SITM,	/* enter_italics_mode, it */
 | 
				
			||||||
	TTYC_VPA,	/* row_address, cv */
 | 
						TTYC_VPA,	/* row_address, cv */
 | 
				
			||||||
	TTYC_XENL,	/* eat_newline_glitch, xn */
 | 
						TTYC_XENL,	/* eat_newline_glitch, xn */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: tty-term.c,v 1.46 2011-02-15 15:12:28 tcunha Exp $ */
 | 
					/* $Id: tty-term.c,v 1.47 2011-04-09 07:48:58 nicm Exp $ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
					 * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
				
			||||||
@@ -181,6 +181,7 @@ const struct tty_term_code_entry tty_term_codes[NTTYCODE] = {
 | 
				
			|||||||
	{ TTYC_SMKX, TTYCODE_STRING, "smkx" },
 | 
						{ TTYC_SMKX, TTYCODE_STRING, "smkx" },
 | 
				
			||||||
	{ TTYC_SMSO, TTYCODE_STRING, "smso" },
 | 
						{ TTYC_SMSO, TTYCODE_STRING, "smso" },
 | 
				
			||||||
	{ TTYC_SMUL, TTYCODE_STRING, "smul" },
 | 
						{ TTYC_SMUL, TTYCODE_STRING, "smul" },
 | 
				
			||||||
 | 
						{ TTYC_SITM, TTYCODE_STRING, "sitm" },
 | 
				
			||||||
	{ TTYC_VPA, TTYCODE_STRING, "vpa" },
 | 
						{ TTYC_VPA, TTYCODE_STRING, "vpa" },
 | 
				
			||||||
	{ TTYC_XENL, TTYCODE_FLAG, "xenl" },
 | 
						{ TTYC_XENL, TTYCODE_FLAG, "xenl" },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										7
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								tty.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: tty.c,v 1.207 2011-04-06 22:18:05 nicm Exp $ */
 | 
					/* $Id: tty.c,v 1.208 2011-04-09 07:48:58 nicm Exp $ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
					 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
				
			||||||
@@ -1218,7 +1218,12 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc)
 | 
				
			|||||||
	if (changed & GRID_ATTR_DIM)
 | 
						if (changed & GRID_ATTR_DIM)
 | 
				
			||||||
		tty_putcode(tty, TTYC_DIM);
 | 
							tty_putcode(tty, TTYC_DIM);
 | 
				
			||||||
	if (changed & GRID_ATTR_ITALICS)
 | 
						if (changed & GRID_ATTR_ITALICS)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							if (tty_term_has(tty->term, TTYC_SITM))
 | 
				
			||||||
 | 
								tty_putcode(tty, TTYC_SITM);
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
			tty_putcode(tty, TTYC_SMSO);
 | 
								tty_putcode(tty, TTYC_SMSO);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if (changed & GRID_ATTR_UNDERSCORE)
 | 
						if (changed & GRID_ATTR_UNDERSCORE)
 | 
				
			||||||
		tty_putcode(tty, TTYC_SMUL);
 | 
							tty_putcode(tty, TTYC_SMUL);
 | 
				
			||||||
	if (changed & GRID_ATTR_BLINK)
 | 
						if (changed & GRID_ATTR_BLINK)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user