Mercurial > hg > xemacs-beta
diff src/redisplay-tty.c @ 284:558f606b08ae r21-0b40
Import from CVS: tag r21-0b40
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:34:13 +0200 |
parents | c5d627a313b1 |
children | 8626e4521993 |
line wrap: on
line diff
--- a/src/redisplay-tty.c Mon Aug 13 10:33:19 2007 +0200 +++ b/src/redisplay-tty.c Mon Aug 13 10:34:13 2007 +0200 @@ -114,18 +114,6 @@ } /***************************************************************************** - tty_divider_width - - Return the width of the vertical divider. This is a function because - divider_width is a console method. - ****************************************************************************/ -static int -tty_divider_width (void) -{ - return 1; -} - -/***************************************************************************** tty_divider_height Return the width of the horizontal divider. This is a function @@ -436,31 +424,35 @@ /***************************************************************************** tty_output_vertical_divider - Draw a vertical divider down the left side of the given window. + Draw a vertical divider down the right side of the given window. ****************************************************************************/ static void tty_output_vertical_divider (struct window *w, int clear) { - struct frame *f = XFRAME (w->frame); - struct console *c = XCONSOLE (FRAME_CONSOLE (f)); - int line; - int y_top = WINDOW_TEXT_TOP (w); - int y_bot = WINDOW_TEXT_BOTTOM (w); - unsigned char divv = '|'; + /* Divider width can either be 0 or 1 on TTYs */ + if (window_divider_width (w)) + { + struct frame *f = XFRAME (w->frame); + struct console *c = XCONSOLE (FRAME_CONSOLE (f)); + int line; + int y_top = WINDOW_TEXT_TOP (w); + int y_bot = WINDOW_TEXT_BOTTOM (w); + unsigned char divv = '|'; - tty_turn_on_face (w, MODELINE_INDEX); - for (line = y_top; line < y_bot; line++) - { - cmgoto (f, line, WINDOW_TEXT_LEFT (w) - 1); + tty_turn_on_face (w, MODELINE_INDEX); + for (line = y_top; line < y_bot; line++) + { + cmgoto (f, line, WINDOW_TEXT_RIGHT (w)); + send_string_to_tty_console (c, &divv, 1); + TTY_INC_CURSOR_X (c, 1); + } + + /* Draw the divider in the modeline. */ + cmgoto (f, y_bot, WINDOW_TEXT_RIGHT (w)); send_string_to_tty_console (c, &divv, 1); TTY_INC_CURSOR_X (c, 1); + tty_turn_off_face (w, MODELINE_INDEX); } - - /* Draw the divider in the modeline. */ - cmgoto (f, y_bot, WINDOW_TEXT_LEFT (w) - 1); - send_string_to_tty_console (c, &divv, 1); - TTY_INC_CURSOR_X (c, 1); - tty_turn_off_face (w, MODELINE_INDEX); } /**************************************************************************** @@ -1548,7 +1540,6 @@ CONSOLE_HAS_METHOD (tty, text_width); CONSOLE_HAS_METHOD (tty, output_display_block); CONSOLE_HAS_METHOD (tty, output_vertical_divider); - CONSOLE_HAS_METHOD (tty, divider_width); CONSOLE_HAS_METHOD (tty, divider_height); CONSOLE_HAS_METHOD (tty, eol_cursor_width); CONSOLE_HAS_METHOD (tty, clear_to_window_end);