Nicholas Marriott
1e06ec41dc
Add a UTF-8 aware string length function and make UTF-8 in
...
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.
2009-06-25 15:47:07 +00:00
Nicholas Marriott
143aa718e5
Space trimmage mega-diff.
2009-05-04 17:58:27 +00:00
Nicholas Marriott
a6f2d82335
Use a (pre)randomised binary tree for UTF-8 character widths. Probably overkill
...
but meh.
2009-04-30 20:54:53 +00:00
Nicholas Marriott
8a160f2d58
- Unbreak selection colouring.
...
- Get UTF-8 check the right way round...
2009-03-30 20:14:50 +00:00
Nicholas Marriott
23fef99009
8 -> UTF8_SIZE.
2009-03-29 11:18:28 +00:00
Nicholas Marriott
4cbf7d489e
- Ignore padding when writing so copying the screen for copy-mode doesn't include extra characters.
...
- Handle combined characters properly when the previous character is not UTF-8.
2009-03-29 11:06:22 +00:00
Nicholas Marriott
cf7b384c43
Better UTF-8 support, including combined characters. Unicode data is now stored
...
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.
2009-03-28 20:17:29 +00:00
Nicholas Marriott
6c0728fe07
Step 2 of the Grand Plan To Make UTF-8 Better.
...
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.
2009-03-28 16:30:05 +00:00
Nicholas Marriott
989d67ccd7
struct grid_data -> struct grid. Stage 1 of the Grand Plan To Make UTF-8 Better.
2009-03-28 15:43:41 +00:00
Nicholas Marriott
8a6a7e74da
CSR resets the cursor to the top-left. Reported by merdely.
2009-03-05 20:27:51 +00:00
Nicholas Marriott
eae026f2f7
Redraw selection properly.
2009-02-25 21:56:46 +00:00
Nicholas Marriott
c45eb2713b
Check the right variable. Doh.
2009-02-24 21:49:05 +00:00
Nicholas Marriott
3969b59ae5
Don't turn cursor off unless actually drawing something.
2009-02-21 19:25:58 +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
c6be7d3ee6
Simplify screen/tty write code to eliminate function pointer which is now
...
unnecessary (it always does the same thing).
2009-02-11 06:31:09 +00:00
Nicholas Marriott
4428987e95
* Better support for at least the most common variant of mouse input: parse 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).
2009-01-28 19:52:21 +00:00
Nicholas Marriott
c1726281c9
Handle cursor on/off better.
2009-01-27 21:39:15 +00:00
Nicholas Marriott
4d7e555a48
Don't screw up UTF-8 combined characters.
2009-01-26 20:57:45 +00:00
Nicholas Marriott
95323a6a36
Leftover label.
2009-01-19 17:15:19 +00:00
Nicholas Marriott
4cdc228353
Unbreak UTF-8.
2009-01-18 21:46:30 +00:00
Nicholas Marriott
1fa36b2419
Use the right size.
2009-01-18 21:21:53 +00:00
Nicholas Marriott
0e197b417a
Tidy a few warnings.
2009-01-17 18:47:37 +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
a1b43faa43
Trim spaces.
2009-01-10 01:51:22 +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
cd8f85c2bd
When I wrote this I somehow forgot that the cursor could helpfully sit at sx
...
(one character off the right of the screen), so there are several out-of-bounds issues. Add some additional checking.
2009-01-08 21:55:12 +00:00
Nicholas Marriott
4ebb85aae8
Don't return NULL when retrieving a string that is too long.
2009-01-08 21:22:01 +00:00
Nicholas Marriott
d7e0ea5cc6
Don't die when backspacing off the edge of the screen, reported by David Chisnall..
2009-01-06 18:07:57 +00:00
Nicholas Marriott
ac3fe6512f
Some tweaks found by LLVM courtesy of IcePic.
2009-01-05 11:04:06 +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
7be7706f4d
Ooops. Check the right value.
2008-11-12 23:38:40 +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
19a2c87f04
Initial UTF-8 support.
2008-09-09 22:16:37 +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
3337dfcae5
Support keypad mode, and get rid of SCREEN_DEF*. Meant to commit these separately but forgot :-/.
2008-07-24 21:42:40 +00:00
Nicholas Marriott
97212771b5
Support keypad. Change cursor key output.
2008-07-23 23:44:50 +00:00
Nicholas Marriott
8873c79cbc
Set window title to current session. New options set-titles to disable.
2008-06-18 18:52:44 +00:00
Nicholas Marriott
7842d29673
Revert attempt to fix stray updates, turns out it was clock :-/.
2008-06-04 19:20:10 +00:00
Nicholas Marriott
39be570b20
vi keys from Will Maier.
2008-06-04 18:50:35 +00:00
Nicholas Marriott
91d790411f
Use the right function...
2007-12-06 19:57:01 +00:00
Nicholas Marriott
85c087ad4e
Another redraw bugs.
2007-12-06 10:44:37 +00:00
Nicholas Marriott
8ec9b07c83
Screen debugging.
2007-12-06 10:36:01 +00:00
Nicholas Marriott
4f44b09195
Redraw buglets.
2007-12-06 10:16:36 +00:00
Nicholas Marriott
103748d6ad
Major reorganisation of screen handling.
2007-12-06 09:46:23 +00:00