Commit Graph

49 Commits (7230fe1648831a17165201b6f02e0365f7b5f938)

Author SHA1 Message Date
Tiago Cunha d13d3a9902 Sync OpenBSD patchset 471:
Add a minor optimisatin: if the character being printed is space, don't worry
about setting the background colour or attributes (except reverse).
2009-10-28 23:17:28 +00:00
Tiago Cunha 8bdcc10c8f Sync OpenBSD patchset 393:
Similarly add a tty_cursor_pane function to tidy up most of the calls.
2009-10-15 01:30:00 +00:00
Tiago Cunha 0ec1ce005c Sync OpenBSD patchset 322:
Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".
2009-09-11 14:13:52 +00:00
Tiago Cunha ed3535db8a Sync OpenBSD patchset 302:
Add a new display-panes command, with two options (display-panes-colour and
display-panes-time), which displays a visual indication of the number of each
pane.
2009-08-31 22:30:15 +00:00
Tiago Cunha c261ae32d2 Sync OpenBSD patchset 240:
Reset the attributes after drawing all or part of the screen, and reset the
region before poll(2). This reduces (but does not eliminate) the chance of the
attributes not being normal if tmux is disconnected without warning (ssh ~.,
reboot from inside, etc).
2009-08-10 21:41:35 +00:00
Tiago Cunha a834d037bc Sync OpenBSD patchset 209:
Pass the ACS border characters through tty_get_acs so they appear correctly on
terminals which don't use the standard set.
2009-07-31 20:35:21 +00:00
Tiago Cunha 5e7a48a865 Sync OpenBSD patchset 179:
Use the full range of ACS line drawing characters to draw pane borders,
including intersections.
2009-07-25 09:03:33 +00:00
Tiago Cunha 723f363c07 Sync OpenBSD patchset 177:
Simplify screen redrawing by drawing the border and background together rather
than border separately, and consolidating all the drawing characters into one
string.
2009-07-25 08:58:19 +00:00
Nicholas Marriott ff500b46c9 For some reason when clearing status/message it was redrawing the entire client
not just the status line. Changing this also revealed the check for the status
line was incorrect when drawing the pane.
2009-07-15 17:44:06 +00:00
Nicholas Marriott 72d56bd614 Instead of faking up a status line in status_redraw, use the same code to
redraw it as to draw the entire screen, just skip all lines but the last.
2009-07-15 17:43:45 +00:00
Nicholas Marriott 1e574bb70c Get rid of the PANE_HIDDEN flag in favour of a function, and moving the
decision for whether or not a pane should be drawn out of the layout code and
into the redraw code.

This is needed for the new layout design, getting it in now to make that easier
to work on.
2009-07-15 17:42:44 +00:00
Nicholas Marriott a5830b9603 Restore $Id$ and add script to do so. 2009-06-25 16:21:32 +00:00
Nicholas Marriott 947fabc751 Unused variables. Found by lint, no binary change. 2009-06-25 16:05:39 +00:00
Nicholas Marriott 143aa718e5 Space trimmage mega-diff. 2009-05-04 17:58:27 +00:00
Nicholas Marriott fb543c7707 Use ACS for line drawing characters. 2009-05-04 13:20:02 +00:00
Nicholas Marriott dbf52facd2 Change scroll/pane redraws to only redraw the single pane affected rather than
the entire window.
2009-04-02 21:08:15 +00:00
Nicholas Marriott 474853439c Only redraw screen when not hidden. Heh. 2009-04-01 21:09:01 +00:00
Nicholas Marriott 15362ef6b8 Don't need to refresh layout here. Also don't redraw over status line. 2009-04-01 18:33:19 +00:00
Nicholas Marriott b6450b167b Basic horizontal splitting and layout management. Still some redraw and other
issues - particularly, don't mix with manual pane resizing and be careful when
viewing from multiple clients; generally cycling the layout a few times will
fix most problems. Getting this in for testing while I think about how to deal
with manual mode.

Split window as normal and cycle the layouts with C-b space. Some of the
layouts will work better when swap-pane comes along.
2009-04-01 18:21:42 +00:00
Nicholas Marriott 6c27f1c335 Draw vertical line on the right when window size is limited. 2009-03-31 18:39:45 +00:00
Nicholas Marriott 587badecdb Clear using ED when redrawing the screen. I foolishly assumed using spaces
would be equivalent and terminals would pick up on this, but apparently
not. This fixes copy and paste in xterm/rxvt.
2009-03-28 10:15:01 +00:00
Nicholas Marriott f6001f9ffc Whoops. Didn't mean to commit this yet. 2009-03-27 16:44:51 +00:00
Nicholas Marriott b97264bb70 Update TODO. 2009-03-27 16:44:00 +00:00
Nicholas Marriott 5b7e882bf6 Don't redraw status if it has already been redrawed as part of entire screen. 2009-02-21 17:52:25 +00:00
Nicholas Marriott e6ed1cc44f Never draw last character: stops stray scrolling sometimes should status line be disabled. 2009-02-12 00:18:05 +00:00
Nicholas Marriott 959eeef505 FreeBSD's console wraps lines at $COLUMNS - 1 rather than $COLUMNS (the cursor can never be beyond $COLUMNS - 1) and does not appear to support changing this behaviour, or any of the obvious possibilities (turning off right margin wrapping, insert mode). This is irritating, most notably because it impossible to write to the very bottom-right of the screen without scrolling. To work around this, if built on FreeBSD and run with a "cons" $TERM, the bottom-right cell on the screen is omitted. 2009-02-11 23:16:45 +00:00
Nicholas Marriott 03d531ebc6 Move sx,sy into tty rather than client. 2009-02-11 17:50:36 +00:00
Nicholas Marriott 514fe11727 We are going to need the updated screen data for emulating the scroll region,
which may involve changing the cursor position; however, the old (before
redraw) cursor position is necessary for writing to the tty. So, save it before
doing the redraw then update the internal screen then update the tty.

Not sure I like this solution but it does the job for now.
2009-02-11 17:04:39 +00:00
Nicholas Marriott e444b0b92a Split most of tty_cmd_cell off to tty_cell. First step on making tty_cmd_* take
a window_pane for later use emulating scroll region.
2009-02-11 06:50:16 +00:00
Nicholas Marriott 2afa8ebc02 Fix various silly problems with status line off. 2009-01-19 20:14:55 +00:00
Nicholas Marriott e9bb939884 Update. 2009-01-14 21:00:41 +00:00
Nicholas Marriott b4ac8c1342 Multiple window splitting. 2009-01-14 19:29:32 +00:00
Nicholas Marriott 7cd3cf0ead Make the window pane code handle panes of different sizes, and add a -l and -p arguments to split-window to specify the new window size in lines or as a percentage. 2009-01-12 18:22:47 +00:00
Nicholas Marriott 162bacdcd9 Window splitting. Two vertical panes fixed 50% each. This is a huge diff, still a couple of bugs (notably heap corruption somewhere causing segfault on exit). 2009-01-11 23:31:46 +00:00
Nicholas Marriott 3ed5aa3e72 Build array of codes, stop using ncurses global variables and push ncurses crap into tty-term.c. 2009-01-09 23:57:42 +00:00
Nicholas Marriott 7a82e86827 Make window options work the same was as session options, add mode-fg/mode-bg options, force -g for global on set/show/setw/showw/ 2008-12-08 16:19:51 +00:00
Nicholas Marriott 62457bce0b Trim. 2008-09-26 06:45:28 +00:00
Nicholas Marriott efe557313a Internal screen data rewrite for better 256 colour/UTF-8 support. 2008-09-25 20:08:57 +00:00
Nicholas Marriott 6674197e85 Fix bold/non-bold mismatch in 256 colour mode by adding an extra 8 bits (ick) onto the attributes and using two of them to mark the fg and bg as 256 colours when necessary. If only it was 255 colours we would have one value for default and wouln't need this :-/. 2008-09-08 22:03:56 +00:00
Nicholas Marriott 4235ddb4e8 Initial 256 colour support, lightly tested. 2008-09-08 17:40:51 +00:00
Nicholas Marriott f0bc951c79 Unused variable. 2008-06-18 16:35:06 +00:00
Nicholas Marriott 55d5b83408 Informational messages on window option changes. 2008-06-16 17:35:40 +00:00
Nicholas Marriott 0591d9ff12 I'm an idiot - it is start,len not start,end. Unbreak. 2008-06-14 18:38:55 +00:00
Nicholas Marriott 0f403474aa New window options: force-width and force-height. This will force a window to
an arbitrary width and height (0 for the default unlimited). This is neat for
  emacs which doesn't have a sensible way to force hard wrapping at 80
  columns. Also, don't try to be clever and use clr_eol when redrawing the
  whole screen, it causes trouble since the redraw functions are used to draw
  the blank areas too.
2008-06-14 16:47:20 +00:00
Nicholas Marriott 62d7ad2690 Clear blank area properly on redraw, and add a marker line below it. 2008-06-14 12:05:06 +00:00
Nicholas Marriott 205b78ec58 Some key tweaks, fix status bar to not rely on attr. 2008-01-03 21:32:11 +00:00
Nicholas Marriott b8e616f445 This was wrong... 2008-01-03 20:01:47 +00:00
Nicholas Marriott e7f68a089e Write status across entire line. 2008-01-03 19:18:14 +00:00
Nicholas Marriott 103748d6ad Major reorganisation of screen handling. 2007-12-06 09:46:23 +00:00