aboutsummaryrefslogtreecommitdiff
path: root/screen-write.c
Commit message (Collapse)AuthorAge
* Sync OpenBSD patchset 186:Tiago Cunha2009-07-28
| | | | | Draw UTF-8 characters under the selection correctly.
* Sync OpenBSD patchset 162:Tiago Cunha2009-07-23
| | | | | | More tty code tidying: move the saved cursor/region position (from before the screen was updated) out of struct screen and into struct tty_ctx.
* Sync OpenBSD patchset 160:Tiago Cunha2009-07-23
| | | | | | | enum tty_cmd is only used as an index into the array of command function pointers, so remove it and use the function pointers directly to represent themselves.
* Sync OpenBSD patchset 159:Tiago Cunha2009-07-22
| | | | | | There are relatively few arguments to tty_cmd_* functions now, so tidy them up by using a struct rather than hiding everything with varargs.
* Sync OpenBSD patchset 158:Tiago Cunha2009-07-22
| | | | | | tty_cmd_raw is only used once, for raw UTF-8 output, so rename it to tty_cmd_utf8character and eliminate the size argument.
* The scroll region cannot be one line only, ignore attempts to make it so.Nicholas Marriott2009-07-15
|
* Cursor up and down should be limited by the scroll region (cuu should stop atNicholas Marriott2009-07-09
| | | | | | 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 clearNicholas Marriott2009-07-09
| | | | | | 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_regionNicholas Marriott2009-07-09
| | | | | functions (currently don't fully work, this is to make fix easier).
* Fix two errors with character/line insertion and deletion: the maximum numberNicholas Marriott2009-07-01
| | | | | | | | | | | 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.
* Whoops, revert.Nicholas Marriott2009-06-26
|
* Remove some unused function declarations; no binary change.Nicholas Marriott2009-06-26
|
* Status line fixes: don't truncate status-right now the length calculation isNicholas Marriott2009-06-26
| | | | | | 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.
* Whitespace and more syncing.Nicholas Marriott2009-06-25
|
* Restore $Id$ and add script to do so.Nicholas Marriott2009-06-25
|
* Support insert mode by using insert character to shift the cells before writingNicholas Marriott2009-06-25
| | | | | as normal.
* Implement the DEC alignment test. With the last change this is enough for theNicholas Marriott2009-06-25
| | | | | | 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 linesNicholas Marriott2009-06-25
| | | | | 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-setNicholas Marriott2009-06-25
| | | | | | 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 inNicholas Marriott2009-06-25
| | | | | | | 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.
* Space trimmage mega-diff.Nicholas Marriott2009-05-04
|
* Use a (pre)randomised binary tree for UTF-8 character widths. Probably overkillNicholas Marriott2009-04-30
| | | | | but meh.
* - Unbreak selection colouring.Nicholas Marriott2009-03-30
| | | | | - Get UTF-8 check the right way round...
* 8 -> UTF8_SIZE.Nicholas Marriott2009-03-29
|
* - Ignore padding when writing so copying the screen for copy-mode doesn't ↵Nicholas Marriott2009-03-29
| | | | | | | include extra characters. - Handle combined characters properly when the previous character is not UTF-8.
* Better UTF-8 support, including combined characters. Unicode data is now storedNicholas Marriott2009-03-28
| | | | | | | | | | | as UTF-8 in a separate array, the code does a lookup into this every time it gets to a UTF-8 cell. Zero width characters are just appended onto the UTF-8 data for the previous cell. This also means that almost no bytes extra are wasted non-Unicode data (yay). Still some oddities, such as copy mode skips over wide characters in a strange way, and the code could do with some tidying.
* Step 2 of the Grand Plan To Make UTF-8 Better.Nicholas Marriott2009-03-28
| | | | | | | | | | | | | | | | | | | Split grid into two arrays, one containing grid attributes/flags/colours (keeps the name grid_cell for now) and a separate with the character data (called text). The text is stored as a u_short but is treated as a uint64_t elsewhere; eventually the grid will have two arrays. I'm not happy with the naming so that might change. Still need to decide where to go from here. I'm not sure whether to combine the peek/set functions together, and also whether to continue to treat the text as a uint64_t (and convert to/from Unicode) or make it a char array (of size one when UTF-8 disabled, eight when enabled) and keep everything as UTF-8. Also since UTF-8 will eventually become an attribute of the grid itself it might be nice to move all the padding crap into grid.c.
* struct grid_data -> struct grid. Stage 1 of the Grand Plan To Make UTF-8 Better.Nicholas Marriott2009-03-28
|
* CSR resets the cursor to the top-left. Reported by merdely.Nicholas Marriott2009-03-05
|
* Redraw selection properly.Nicholas Marriott2009-02-25
|
* Check the right variable. Doh.Nicholas Marriott2009-02-24
|
* Don't turn cursor off unless actually drawing something.Nicholas Marriott2009-02-21
|
* We are going to need the updated screen data for emulating the scroll region,Nicholas Marriott2009-02-11
| | | | | | | | | 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.
* Simplify screen/tty write code to eliminate function pointer which is nowNicholas Marriott2009-02-11
| | | | | unnecessary (it always does the same thing).
* * Better support for at least the most common variant of mouse input: parse ↵Nicholas Marriott2009-01-28
| | | | | | | it and adjust for different panes. Also support mouse in window/session choice mode. * Bring back the fancy window titles with session/window names: it is easy to work around problems with elinks (see FAQ).
* Handle cursor on/off better.Nicholas Marriott2009-01-27
|
* Don't screw up UTF-8 combined characters.Nicholas Marriott2009-01-26
|
* Leftover label.Nicholas Marriott2009-01-19
|
* Unbreak UTF-8.Nicholas Marriott2009-01-18
|
* Use the right size.Nicholas Marriott2009-01-18
|
* Tidy a few warnings.Nicholas Marriott2009-01-17
|
* Window splitting. Two vertical panes fixed 50% each. This is a huge diff, ↵Nicholas Marriott2009-01-11
| | | | still a couple of bugs (notably heap corruption somewhere causing segfault on exit).
* Trim spaces.Nicholas Marriott2009-01-10
|
* Build array of codes, stop using ncurses global variables and push ncurses ↵Nicholas Marriott2009-01-09
| | | | crap into tty-term.c.
* When I wrote this I somehow forgot that the cursor could helpfully sit at sxNicholas Marriott2009-01-08
| | | | | (one character off the right of the screen), so there are several out-of-bounds issues. Add some additional checking.
* Don't return NULL when retrieving a string that is too long.Nicholas Marriott2009-01-08
|
* Don't die when backspacing off the edge of the screen, reported by David ↵Nicholas Marriott2009-01-06
| | | | Chisnall..
* Some tweaks found by LLVM courtesy of IcePic.Nicholas Marriott2009-01-05
|
* Make window options work the same was as session options, add ↵Nicholas Marriott2008-12-08
| | | | mode-fg/mode-bg options, force -g for global on set/show/setw/showw/
* Ooops. Check the right value.Nicholas Marriott2008-11-12
|