aboutsummaryrefslogtreecommitdiff
path: root/tty.c
Commit message (Collapse)AuthorAge
...
* Sync OpenBSD patchset 714:Tiago Cunha2010-06-06
| | | | | Shut up gcc4 warnings.
* Sync OpenBSD patchset 710:Tiago Cunha2010-06-06
| | | | | | | | | | When the mode-mouse option is on, support dragging to make a selection in copy mode. Also support the scroll wheel, although xterm strangely does not ignore it in application mouse mode, causing redraw artifacts when scrolling up (other terminals appear to be better behaved).
* Sync OpenBSD patchset 656:Tiago Cunha2010-03-08
| | | | | | | | Check for colour and attribute modifications early so the translated values can be stored in the cached terminal attributes rather than the requested (untranslated) values. Prevents tmux clearing and setting the attributes for every character when using aixterm colours.
* Sync OpenBSD patchset 654:Tiago Cunha2010-02-26
| | | | | | Don't set the terminal to nonblocking on detach until we have finished with it entirely.
* Sync OpenBSD patchset 630:Tiago Cunha2010-02-02
| | | | | | | If redrawing line 0 of the screen onto the tty, there can't be a wrap flag on the previous line, so move the cursor. Fixes status line redraw issues when resizing in choose mode and hopefully at other times as well.
* Sync OpenBSD patchset 595:Tiago Cunha2010-01-05
| | | | | Use tcflush(3) instead of TIOCFLUSH, from Ed Schouten.
* Sync OpenBSD patchset 594:Tiago Cunha2009-12-26
| | | | | Fix the logic so that transition from a 256 colour to default works properly.
* Sync OpenBSD patchset 593:Tiago Cunha2009-12-26
| | | | | Nuke some stray debugging.
* Sync OpenBSD patchset 589:Tiago Cunha2009-12-16
| | | | | | Pass through the aixterm bright colours if the terminal supports them (>= 16 colours).
* Sync OpenBSD patchset 583:Tiago Cunha2009-12-04
| | | | | | vte is buggy and doesn't home the cursor after changing the scroll region. Several people are hitting this, so add a workaround.
* Sync OpenBSD patchset 581:Tiago Cunha2009-12-04
| | | | | | | Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last time now I've configured emacs to make them displayed in really annoying colours...
* Sync OpenBSD patchset 579:Tiago Cunha2009-12-04
| | | | | Reflect the keypad mode of the application so that numlock works.
* Sync OpenBSD patchset 574:Tiago Cunha2009-11-28
| | | | | Add a couple of comments.
* Sync OpenBSD patchset 571:Tiago Cunha2009-11-28
| | | | | Fix type - attributes should be u_char not int.
* Sync OpenBSD patchset 567:Tiago Cunha2009-11-28
| | | | | | Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to the rest to reduce lint output.
* Sync OpenBSD patchset 563:Tiago Cunha2009-11-28
| | | | | Emulate il1, dl1, ich1 to run (albeit slowly) with vt100 feature set.
* Sync OpenBSD patchset 547:Tiago Cunha2009-11-19
| | | | | | | | | Cleanup by moving various (mostly horrible) little bits handling UTF-8 grid data into functions in a new file, grid-utf8.c, and use sizeof intead of UTF8_DATA. Also nuke trailing whitespace from tmux.1, reminded by jmc.
* Sync OpenBSD patchset 532:Tiago Cunha2009-11-13
| | | | | | | | Emulate the ri (reverse index) capability: this allows tmux to at least start on Sun consoles (TERM=sun or sun-color), even if there appear to still be problems on some boxes (my Blade 100 is fine but edd's Blade 1000 shows odd screen corruption).
* Sync OpenBSD patchset 520:Tiago Cunha2009-11-10
| | | | | | Just ignore tty fd errors rather than dying, stops the server dying if the session is disconnected abrubtly (eg ssh ~.).
* Sync OpenBSD patchset 516:Tiago Cunha2009-11-08
| | | | | | | Clear to the end of the screen from the right starting point when drawing line-by-line (in panes or if ed not supported). Fixes problem spotted by Frank Terbeck.
* Sync OpenBSD patchset 508:Tiago Cunha2009-11-08
| | | | | | | | | | | | Switch tty key input over to happen on a read event. This is a bit more complicated because of escape input, but in that case instead of processing a key immediately, schedule a timer and reprocess the bufer when it expires. This currently assumes that keys will be atomic (ie that if eg F1 is pressed the entire sequence is present in the buffer). This is usually but not always true, a change in the tree format so it can differentiate potential (partial) key sequences will happens soon and will allow this to be fixed.
* Sync OpenBSD patchset 495:Tiago Cunha2009-11-08
| | | | | Switch tty fds over to a bufferevent.
* Sync OpenBSD patchset 489:Tiago Cunha2009-11-04
| | | | | Ignore the colour on space, /not/ the attributes.
* Sync OpenBSD patchset 488:Tiago Cunha2009-11-04
| | | | | | Fix the reverse emulation when a terminal doesn't have setab to use the correct fg/bg (adjusted if spaces) and happen before attribute setting.
* Sync OpenBSD patchset 471:Tiago Cunha2009-10-28
| | | | | | Add a minor optimisatin: if the character being printed is space, don't worry about setting the background colour or attributes (except reverse).
* Sync OpenBSD patchset 470:Tiago Cunha2009-10-28
| | | | | Twaek this slightly to avoid confusing use of flags variable.
* Sync OpenBSD patchset 469:Tiago Cunha2009-10-28
| | | | | | | | | | Setting SGR0 when setting the fg and bg has problems if only one of the two is meant to be default, so rewrite the code to move this outside, move setting colours before attributes and generally clean up. Tested by sthen@, fixes problems he was seeing with mutt and should fix some existing problems with (rarely) lost attributes.
* Sync OpenBSD patchset 467:Tiago Cunha2009-10-28
| | | | | tabs are better; ok nicm
* Sync OpenBSD patchset 446:Tiago Cunha2009-10-28
| | | | | | | | | | | | | | | Remove the -d flag to tmux and just use op/AX to detect default colours. Irritatingly, although op can be used to tell if a terminal supports default colours, it can't be used to set them because in some terminfo descriptions it resets attributes as a side-effect (acts as sgr0) and in others it doesn't, so it is not possible to determine reliably what the terminal state will be afterwards. So if AX is missing and op is present, tmux just sends sgr0. Anyone using -d for a terminal who finds they actually needed it can replace it using terminal-overrides, but please let me know as it is probably an omission from terminfo.
* Sync OpenBSD patchset 432:Tiago Cunha2009-10-23
| | | | | Unused variable.
* Sync OpenBSD patchset 429:Tiago Cunha2009-10-23
| | | | | | Now we are correctly not redrawing the whole pane on linefeed, redo the last-cursor-position code to move to the right position when panes reach EOL.
* Sync OpenBSD patchset 427:Tiago Cunha2009-10-23
| | | | | | | Don't redraw the scroll region on linefeed/reverse index unless it is necessary (the cursor is at the bottom/top). Should fix slow cursor movement when using vi in a pane spotted by pirofti@.
* Sync OpenBSD patchset 426:Tiago Cunha2009-10-23
| | | | | | | | | Some terminals don't correctly clear their let's-wrap flag after changing the scroll region (which moves the cursor to 0,0). This means that if the cursor was at the edge of the screen, any further output after scroll region change incorrectly causes a line wrap. Add a workaround to move the cursor to position 0 if it is at the screen edge before changing scroll region.
* Sync OpenBSD patchset 421:Tiago Cunha2009-10-23
| | | | | | | | | | | | | | | Try to reduce the UTF-8 mess. Get rid of passing around u_char[4]s and define a struct utf8_data which has character data, size (sequence length) and width. Move UTF-8 character collection into two functions utf8_open/utf8_append in utf8.c which fill in this struct and use these functions from input.c and the various functions in screen-write.c. Space for rather more data than is necessary for one UTF-8 sequence is in the utf8_data struct because screen_write_copy is still nasty and needs to reinject the character (after combining) into screen_write_cell.
* Sync OpenBSD patchset 420:Tiago Cunha2009-10-23
| | | | | | | | | | | | | UTF-8 combined character fixes. Thai can have treble combinations (1 x width=1 then 2 x width=0) so bump the UTF-8 cell data size to 9 and alter the code to allow this. Also break off the combining code into a separate function, handle any further combining beyond the buffer size by replacing the character with _s, and when redrawing the UTF-8 character don't assume the first part has just been printed, redraw the entire line.
* Sync OpenBSD patchset 419:Tiago Cunha2009-10-23
| | | | | | Move the check for whether to force a line wrapper lower down into the tty code where it has access to the tty width, which is what should have been checked.
* Sync OpenBSD patchset 416:Tiago Cunha2009-10-23
| | | | | | | | Always move the cursor position on !xenl terminals, since there is no invisible last cursor position. Also nuke an unused variable.
* Sync OpenBSD patchset 414:Tiago Cunha2009-10-23
| | | | | | | | Instead of having a complicated check to see if the cursor is in the last position to avoid an explicit wrap, actually move it there. Some UTF-8 fixes to come.
* Sync OpenBSD patchset 413:Tiago Cunha2009-10-23
| | | | | | | When checking whether the region will scroll and the cursor position is thus unsuitable for using CUD/CUU, check the current cursor position not the target position.
* Sync OpenBSD patchset 404:Tiago Cunha2009-10-15
| | | | | Don't try to use \n across scroll region when doing \r\n either.
* Sync OpenBSD patchset 402:Tiago Cunha2009-10-15
| | | | | | Instead of using something sort of similar for both newline checks, use something the same. Doesn't fix the bug I'm looking for though :-/.
* Sync OpenBSD patchset 401:Tiago Cunha2009-10-15
| | | | | | | | | | | | | | When drawing lines that have wrapped naturally, don't force a newline but permit them to wrap naturally again. This allows terminals that use this to guess where lines start and end for eg mouse selecting (like xterm) to work correctly. This was another long-standing issue raised by several people over the last while. Thanks to martynas@ for much testing. This was not trivial to get right so bringing it in for wider testing and adn to fix any further glitches in-tree.
* Sync OpenBSD patchset 399:Tiago Cunha2009-10-15
| | | | | | | Don't run through the column unchanged case if the row was unchanged but there were no suitable optimisations, instead make it an else to fall through to absolute addressing.
* Sync OpenBSD patchset 398:Tiago Cunha2009-10-15
| | | | | | If the vertical cursor movement crosses the scroll region, CUU and CUD shouldn't be used even if VPA isn't present - in that case CUP should be used.
* Sync OpenBSD patchset 396:Tiago Cunha2009-10-15
| | | | | | Use absolute movement if right at the end of the line as it isn't a reliable place to move from relatively.
* Sync OpenBSD patchset 395:Tiago Cunha2009-10-15
| | | | | | | Use relative cursor movement instead of absolute when possible and when supported by the terminal to reduce the size of the output data (generally about 10-20%).
* Sync OpenBSD patchset 393:Tiago Cunha2009-10-15
| | | | | Similarly add a tty_cursor_pane function to tidy up most of the calls.
* Sync OpenBSD patchset 392:Tiago Cunha2009-10-15
| | | | | _absolute is redundant, just use tty_region.
* Sync OpenBSD patchset 391:Tiago Cunha2009-10-15
| | | | | | Cleanup: use two functions for region setting, one for absolute and one inside pane.
* Sync OpenBSD patchset 390:Tiago Cunha2009-10-12
| | | | | | | | Like linefeed, don't set the scroll region for reverse index unless it will be needed. While here, also tidy up a couple of long lines and remove an extraneous blank.