summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/screen-write.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* UTF-8 combined character fixes.nicm2009-10-201-29/+67
| | | | | | | | | | 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.
* Move the check for whether to force a line wrapper lower down into the tty codenicm2009-10-201-22/+8
| | | | where it has access to the tty width, which is what should have been checked.
* Always move the cursor position on !xenl terminals, since there is no invisiblenicm2009-10-171-7/+7
| | | | | | last cursor position. Also nuke an unused variable.
* Don't print wide characters at screen width - 1. Matches uterm behaviour andnicm2009-10-171-9/+9
| | | | is probably a better idea anyway.
* Instead of having a complicated check to see if the cursor is in the lastnicm2009-10-171-22/+50
| | | | | | position to avoid an explicit wrap, actually move it there. Some UTF-8 fixes to come.
* When drawing lines that have wrapped naturally, don't force a newline butnicm2009-10-121-8/+28
| | | | | | | | | | | | 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.
* When backspace is received at the beginning of a line and the previous line wasnicm2009-10-121-1/+21
| | | | | | | | wrapped, move the cursor back up to the end of the previous line. Another one of the forgotten persons requested this quite a while ago (I need to start noting names on todo items...) when it was quite hard to implement. Now it is easy and I don't see it can do any harm, so hey presto...
* Wrap a couple of long lines.nicm2009-10-121-3/+5
|
* Permit attributes to be turned off in #[] by prefixing with "no", for examplenicm2009-10-121-1/+5
| | | | "noblink".
* Stick line length to what is actually used (removing an optimization thatnicm2009-09-151-14/+31
| | | | | | | | allowed it to be bigger), and use clear line/EOL sequences rather than spaces in copy/scroll mode. This fixes xterm copy/paste from tmux which treats trailing spaces differently from clearing a line with the escape sequences. Reported by martynas@.
* Permit options such as status-bg to be configured using the entire 256 colournicm2009-09-101-8/+21
| | | | palette by setting "colour0" to "colour255".
* Permit embedded colour and attributes in status-left and status-right using newnicm2009-09-071-1/+173
| | | | #[] special characters, for example #[fg=red,bg=blue,blink].
* Ugh, committed the wrong version of this change and got both solutions rathernicm2009-08-211-4/+1
| | | | than just the second. Remove unused assignment.
* A few trivial optimisations: no need to check for zero size if callingnicm2009-08-201-12/+16
| | | | | | buffer_ensure in buffer.c; expand grid lines by a greater increase than one each time; and don't read UTF-8 data unless it actually needs to be checked when overwriting a cell.
* It was originally intended that scroll mode would show content that wasnicm2009-08-131-10/+10
| | | | | | | currently off-screen due to resize, but somewhere along the way this got lost. Restore this behaviour to scroll mode by fixing screen_write_copy to read up to the saved line length rather than the current screen width. Copy mode remains unaltered for now.
* Add a flags member to the grid_line struct and use it to differentiate linesnicm2009-08-081-6/+13
| | | | | wrapped at the screen edge from those terminated by a newline. Then use this when copying to combine wrapped lines together into one.
* Plug some memory leaks.nicm2009-07-301-1/+2
|
* Draw UTF-8 characters under the selection correctly.nicm2009-07-271-11/+13
|
* More tty code tidying: move the saved cursor/region position (from before thenicm2009-07-221-42/+68
| | | | screen was updated) out of struct screen and into struct tty_ctx.
* enum tty_cmd is only used as an index into the array of command functionnicm2009-07-221-20/+20
| | | | | pointers, so remove it and use the function pointers directly to represent themselves.
* There are relatively few arguments to tty_cmd_* functions now, so tidy them upnicm2009-07-221-21/+27
| | | | by using a struct rather than hiding everything with varargs.
* tty_cmd_raw is only used once, for raw UTF-8 output, so rename it tonicm2009-07-221-7/+2
| | | | tty_cmd_utf8character and eliminate the size argument.
* The scroll region cannot be one line only, ignore attempts to make it so.nicm2009-07-141-2/+2
|
* Cursor up and down should be limited by the scroll region (cuu should stop atnicm2009-07-091-5/+19
| | | | | the scroll region top if starting from below it and cud stop at the bottom if starting from above). Fixes another vttest test.
* Change inserting and deleting lines inside the scroll region to properly clearnicm2009-07-091-6/+34
| | | | | lines that should be inserted/deleted but not moved. Fixes problems with mutt reported by Brian Lewis, thanks.
* Tidy by removing unused argument from grid_view_{insert,delete}_line_regionnicm2009-07-091-9/+5
| | | | functions (currently don't fully work, this is to make fix easier).
* Fix two errors with character/line insertion and deletion: the maximum numbernicm2009-06-291-9/+9
| | | | | | | | | | of characters which may be inserted or deleted is the screen width, not one less (and similarly for lines and height); and if characters or lines are deleted by moving the ones that follow, the space at the end needs to be cleared. This appears to solve long-standing redraw issues most visible when using the force-width option then scrolling in view(1) or unwrapping lines in emacs.
* Status line fixes: don't truncate status-right now the length calculation isnicm2009-06-261-2/+2
| | | | | done for UTF-8, limit to the maximum length correctly when printing, and always print a space even if the left string is longer than the width available.
* Remove trailing newlines, spaces, and tabs.ray2009-06-051-5/+5
| | | | No binary change.
* Support insert mode by using insert character to shift the cells before writingnicm2009-06-031-1/+11
| | | | as normal.
* Implement the DEC alignment test. With the last change this is enough for thenicm2009-06-031-1/+26
| | | | | first cursor test in vttest (in ports) to pass; it still shops a few more problems though.
* Fix some miscalculations when clearing to start of screen: the number of linesnicm2009-06-031-3/+3
| | | | to the cursor is cy not cy - 1, and the current cursor cell should be included.
* New session option, status-utf8, to control the interpretation of top-bit-setnicm2009-06-031-12/+12
| | | | | characters in status-left and status-right (if on, they are treated as UTF-8; otherwise passed through).
* Add a UTF-8 aware string length function and make UTF-8 innicm2009-06-031-5/+111
| | | | | | status-left/status-right work properly. At the moment any top-bit-set characters are assumed to be UTF-8: a status-utf8 option to configure this will come shortly.
* Import tmux, a terminal multiplexor allowing (among other things) a singlenicm2009-06-011-0/+684
terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti