Commit Graph

249 Commits

Author SHA1 Message Date
Kovid Goyal
7da08d37d2
File to host graphics tests 2017-09-30 13:51:49 +05:30
Kovid Goyal
23c2bdb6f0
Dont silently wrap too large ids, instead ignore the graphics command 2017-09-30 13:51:49 +05:30
Kovid Goyal
7736629bc4
Fix graphics id not going upto UINT32_MAX 2017-09-30 13:51:49 +05:30
Kovid Goyal
204bd97198
Nicer error responses on bad graphics data 2017-09-30 13:51:49 +05:30
Kovid Goyal
66bce4b8cd
Code to read image data 2017-09-30 13:51:48 +05:30
Kovid Goyal
c567acb4e5
Work on loading images 2017-09-30 13:51:48 +05:30
Kovid Goyal
15e03f74f4
Also report the payload for graphics commands 2017-09-30 13:51:47 +05:30
Kovid Goyal
56c2e0c26a
Report incomplete graphics commands as parser errors 2017-09-30 13:51:47 +05:30
Kovid Goyal
83de392b39
... 2017-09-30 13:51:47 +05:30
Kovid Goyal
3c89f80603
More tests for the graphics control code parser 2017-09-30 13:51:47 +05:30
Kovid Goyal
8e64895c23
Framework for testing graphics command parsing 2017-09-30 13:51:47 +05:30
Kovid Goyal
b8d9629ee4
Start work on parsing of graphics escape code 2017-09-30 13:51:46 +05:30
Kovid Goyal
5b24d51fcd
Fix failing screen resize test
Take into account the index that now happens to ensure that
the cursor is on a new line.
2017-09-30 13:51:35 +05:30
Kovid Goyal
3ca45ab241
Fix cursor moving one line up when resizing 2017-09-20 10:59:31 +05:30
Kovid Goyal
bc1de92534
Fix the broken tests 2017-09-16 17:05:58 +05:30
Kovid Goyal
9cd146fe3e
Remove the buf_toggled callback 2017-09-16 16:31:29 +05:30
Kovid Goyal
c5e989bc94
Move the key handler to C 2017-09-15 21:46:00 +05:30
Kovid Goyal
464291bbb1
Port click on URL code to C 2017-09-15 10:45:27 +05:30
Kovid Goyal
271b623f82
More URL detection tests 2017-09-15 10:45:25 +05:30
Kovid Goyal
88d896e745
Move function to detect URLs into C code 2017-09-15 10:45:25 +05:30
Kovid Goyal
c683725434
Get rid of the timers infrastructure
It is not needed with a pure state machine.
Note that drag scrolling still has to be ported from using
timers.
2017-09-15 10:45:24 +05:30
Kovid Goyal
bc97cfa024
Use a null to represent a blank rather than a space
This has performance benefits when clearing (can use a single
memset). Also allows detecting trailing whitespace on lines correctly.
2017-09-15 10:45:16 +05:30
Kovid Goyal
029ff84f09
Remove the change tracker related tests
The change tracker no longer exists
2017-09-15 10:45:16 +05:30
Kovid Goyal
6127d2d122
Make the sprite map globally accessible from C code as well as python code
The lock was removed as the Python GIL is sufficient to serialize access
to the SpriteMap structure.
2017-09-15 10:45:10 +05:30
Kovid Goyal
a429bcbb22
Dont use the glfw timer function as it requires glfwInit 2017-09-15 10:45:07 +05:30
Kovid Goyal
08f336769f
Add tests for key mapping
Also fix Alt+Special keys no generating correct codes
2017-05-20 11:41:21 +05:30
Kovid Goyal
cd1ba334c1
Forgot to change test 2017-05-19 15:54:34 +05:30
Kovid Goyal
3f272d102b Test for toggling IUTF8 2017-04-28 09:41:47 +05:30
Kovid Goyal
898a8075be Fix #69 2017-04-28 08:31:07 +05:30
Kovid Goyal
01c289e440 Add ST test to OTH tests as well 2017-04-05 09:09:41 +05:30
Kovid Goyal
db2d14d9ed Fix backslashes in OSC codes not being parsed correctly
Fixes #61
2017-04-05 09:07:55 +05:30
Kovid Goyal
edab1aebaa Allow clients to query if the terminal emulator support styled underlines 2017-02-10 16:00:51 +05:30
Kovid Goyal
585a01fff6 Start out in normal key mode
Matches behavior of xterm
2017-02-05 16:39:40 +05:30
Kovid Goyal
bb7edb5f8f Implement DECRQM
Also add tests for DECRQM and DECCKM
2017-02-05 16:21:13 +05:30
Kovid Goyal
cc14562f2c Forgot the unicode version of APC and PM 2017-01-20 13:40:58 +05:30
Kovid Goyal
0612855c95 Ignore PM and APC control codes 2017-01-20 13:31:05 +05:30
Kovid Goyal
9c501b37ea Allow skipping of tests that depend on a modern wcwidth() via an env var 2017-01-10 13:52:15 +05:30
Kovid Goyal
2517e4a8a0 Expand the wcwidth test 2017-01-09 07:13:14 +05:30
Kovid Goyal
af8d44ecab Refactor screen mode API to use get/setters 2017-01-04 10:24:00 +05:30
Kovid Goyal
b4af2ff314 The cursor visible (DECTCEM) property should be global, not affected by save/restore of cursor or alternate screens 2017-01-04 10:02:39 +05:30
Kovid Goyal
3c9d4dfb90 Fix designate_charset without change_charset not taking effect 2016-12-13 12:43:20 +05:30
Kovid Goyal
0797f159ad Only move the cursor a line down on resize if the cursor line was split 2016-12-12 12:44:33 +05:30
Kovid Goyal
271e3360ff Fix top lines appearing at bottom when resizing a screen that seen more lines than the number of lines available 2016-12-12 10:58:18 +05:30
Kovid Goyal
b6c639c487 Fix incorrect handling of trailing whitespace for lines in the history buffer when resizing 2016-12-11 14:48:00 +05:30
Kovid Goyal
ae3f555f51 HistoryBuf.as_ansi() 2016-12-09 19:39:20 +05:30
Kovid Goyal
471b36832e ... 2016-12-09 12:46:02 +05:30
Kovid Goyal
5a6ecbbf43 LineBuf.as_ansi() 2016-12-09 12:44:39 +05:30
Kovid Goyal
e3e3e86598 Code to get the ANSI representation of a line 2016-12-08 21:11:12 +05:30
Kovid Goyal
489504cda5 More charset fixes
Properly use the G0/G1 charsets only to map characters being drawn to
the screen. And only decode bytes using either Latin-1 or UTF-8,
defaulting to UTF-8 at startup/reset.
2016-11-30 23:36:10 +05:30
Kovid Goyal
b343625b9f Add a simple test for SGR 2016-11-30 21:16:04 +05:30
Kovid Goyal
ce1514963b Various charset related fixes
Fix changing of charset not taking effect immediately while parsing a
single block of bytes

Fix incorrect mapping of C0 control codes in some of the charsets
2016-11-30 19:44:41 +05:30
Kovid Goyal
c713712f89 Restore support for charsets other than UTF-8 2016-11-30 17:48:52 +05:30
Kovid Goyal
45a5190a0d Handle CSI codes that start with a ; 2016-11-30 16:03:45 +05:30
Kovid Goyal
a095fffc67 Finish up the margins test 2016-11-30 15:12:00 +05:30
Kovid Goyal
2b39b3a053 Change tests now that we dont report ch number for simple commands 2016-11-30 15:06:17 +05:30
Kovid Goyal
95d3f20832 Do not ignore CUP when y is out of margins, instead clamp to margins 2016-11-30 14:58:34 +05:30
Kovid Goyal
f0b1af964b Fix clearing of tab stops 2016-11-30 10:21:37 +05:30
Kovid Goyal
5b78769d28 Report unshifted mode numbers 2016-11-30 09:04:59 +05:30
Kovid Goyal
f9fa73cd43 ... 2016-11-30 08:52:32 +05:30
Kovid Goyal
56cfc7df3b Handle leading zeroes in CSI codes 2016-11-30 08:50:55 +05:30
Kovid Goyal
358b2bc5f1 Modify tests for SGR reporting 2016-11-30 08:15:40 +05:30
Kovid Goyal
4f5daa94d0 Clean up the mode handling code 2016-11-24 21:18:04 +05:30
Kovid Goyal
abd09464f0 Implement control code to change colors 2016-11-24 16:28:08 +05:30
Kovid Goyal
3031d41e72 Start work on supporting changing of entries in the color table 2016-11-24 15:28:52 +05:30
Kovid Goyal
9e0e757179 ... 2016-11-24 13:48:13 +05:30
Kovid Goyal
41e583842e Flush draw buf at end of each parse call 2016-11-24 13:43:28 +05:30
Kovid Goyal
2e3e6d331d Parse DCS+q 2016-11-24 08:14:29 +05:30
Kovid Goyal
101afd5031 Switch title handling to use unicode 2016-11-23 20:28:30 +05:30
Kovid Goyal
91f80a3c85 Switch screen tests to use unicode directly 2016-11-23 20:26:29 +05:30
Kovid Goyal
2c3893d8a4 Port parsing of CSI codes 2016-11-23 20:23:37 +05:30
Kovid Goyal
ce8db74154 Port OSC parsing 2016-11-23 17:25:38 +05:30
Kovid Goyal
cdd58207a3 Start migrating the tests 2016-11-23 15:47:22 +05:30
Kovid Goyal
f14e7037e2 Start work on dumping non-UTF-8 charset support 2016-11-23 15:33:08 +05:30
Kovid Goyal
4b0e8fcb49 ... 2016-11-23 11:11:23 +05:30
Kovid Goyal
3c8d2dce36 ... 2016-11-21 10:25:53 +05:30
Kovid Goyal
5681138243 Fix scrollback_lines opt not being used 2016-11-21 09:07:52 +05:30
Kovid Goyal
7b1591113a Basic tests for HistoryBuf.rewrap 2016-11-20 22:40:43 +05:30
Kovid Goyal
776224378d Basic tests for HistoryBuf 2016-11-20 20:40:10 +05:30
Kovid Goyal
0b0a216856 Use HistoryBuf (still need to implement rewrap) 2016-11-20 20:20:14 +05:30
Kovid Goyal
42976b1048 Allow OSC codes that consist of only a numeric component 2016-11-19 13:48:49 +05:30
Kovid Goyal
6293b37ead Fix no cursor position update after drawing small amounts of text 2016-11-18 16:46:04 +05:30
Kovid Goyal
14c6d327fd Also output draw commands when dumping commands 2016-11-18 16:29:15 +05:30
Kovid Goyal
1426f87c99 ... 2016-11-18 15:49:39 +05:30
Kovid Goyal
3ce2c0553f Use the new native screen class 2016-11-18 15:30:59 +05:30
Kovid Goyal
a120b25286 Stub for DCS codes 2016-11-18 11:31:48 +05:30
Kovid Goyal
4ac03a0064 Implement parsing of OSC codes 2016-11-18 11:16:17 +05:30
Kovid Goyal
1edba3ce42 Implement DECSCUSR 2016-11-17 13:50:20 +05:30
Kovid Goyal
03fd30b4f4 Implement DECSTBM 2016-11-17 11:13:28 +05:30
Kovid Goyal
586304ad6c Implement DSR 2016-11-17 10:59:15 +05:30
Kovid Goyal
f56da9392c Implement SGR 2016-11-17 08:34:55 +05:30
Kovid Goyal
f5fa40de81 More CSI handlers 2016-11-16 20:19:31 +05:30
Kovid Goyal
745ba5c4cb Allow parameter less CSI sequences 2016-11-16 19:53:38 +05:30
Kovid Goyal
d0c2821339 Start work on connecting CSI callbacks 2016-11-16 13:40:38 +05:30
Kovid Goyal
f6faecbaaa Start work on CSI parser
Also cleaup error reporting and command dumping macros
2016-11-16 11:44:41 +05:30
Kovid Goyal
5208500eb9 Implement basic ESC code handling 2016-11-16 09:07:15 +05:30
Kovid Goyal
44a8cc062e Add testing for command dumping as well 2016-11-14 20:40:54 +05:30
Kovid Goyal
5069b50fb2 Add simple parsing tests 2016-11-14 20:10:01 +05:30
Kovid Goyal
a734fb79e6 All screen tests pass with the new screen code 2016-11-13 22:23:28 +05:30
Kovid Goyal
bfaaf41a9f ... 2016-11-13 17:01:45 +05:30
Kovid Goyal
604c4e599c ... 2016-11-13 16:52:59 +05:30
Kovid Goyal
fa106c2585 More work on migrating Screen 2016-11-13 16:51:14 +05:30
Kovid Goyal
9a7b4263e0 More work on the screen replacement
The first set of tests now pass
2016-11-13 14:10:57 +05:30
Kovid Goyal
fab2213c25 More work on native streams 2016-11-13 10:24:00 +05:30
Kovid Goyal
2c0523246d More work on making Screen native 2016-11-12 13:52:18 +05:30
Kovid Goyal
d2a27d9892 Use the native tracker implementation 2016-11-12 08:29:48 +05:30
Kovid Goyal
9b544f83e0 Move change tracking into the screen class 2016-11-11 18:35:26 +05:30
Kovid Goyal
44e8a6c3c7 Start work on sprite map 2016-11-10 17:22:00 +05:30
Kovid Goyal
9069c08016 ... 2016-11-10 12:55:36 +05:30
Kovid Goyal
bbb13a3172 Tests for Screen.index() 2016-11-10 12:54:38 +05:30
Kovid Goyal
b12af6f21d Test for LineBuf.clear()
Also raise IndexError instead of ValueError for line and char access
2016-11-10 12:05:50 +05:30
Kovid Goyal
1884cc17c1 A ColorProfile to manage colors 2016-11-10 10:07:47 +05:30
Kovid Goyal
6334b39935 More tests for rewrap 2016-11-09 19:21:08 +05:30
Kovid Goyal
7108584e7a A more accurate, but slower rewrap algorithm 2016-11-09 17:47:03 +05:30
Kovid Goyal
8623e7b6e7 More tests for rewrap 2016-11-09 11:19:17 +05:30
Kovid Goyal
0904939e4a Some test for rewrap 2016-11-08 21:25:26 +05:30
Kovid Goyal
0a69f00ab4 Re-enable all screen tests 2016-11-08 09:53:51 +05:30
Kovid Goyal
3dc74413a5 Line.clear_text() 2016-11-08 09:00:18 +05:30
Kovid Goyal
9869b30ce5 LineBuf.delete_lines 2016-11-07 20:55:40 +05:30
Kovid Goyal
17e59ccc22 LineBuf.insert_lines 2016-11-07 16:15:46 +05:30
Kovid Goyal
f63a4e7015 Implement the index operations
Scrolling of line buffer one line at a time, optionally saving the
scrolled of line in a history buffer.
2016-11-07 13:03:28 +05:30
Kovid Goyal
20b5534c71 LineBuf.set_continued 2016-11-04 22:41:35 +05:30
Kovid Goyal
7687e75de4 LineBuf.set_attribute 2016-11-04 22:32:50 +05:30
Kovid Goyal
e3fdd3089d LineBuf.clear() 2016-11-04 15:11:08 +05:30
Kovid Goyal
d324baf979 __eq__ for Line 2016-11-04 14:56:31 +05:30
Kovid Goyal
8324ec1c2b Start work on using the new LineBuf class 2016-11-04 14:44:46 +05:30
Kovid Goyal
8636ddf3cd ... 2016-11-02 20:51:04 +05:30
Kovid Goyal
724a4113d5 Migrate the datatypes tests 2016-11-02 19:36:28 +05:30
Kovid Goyal
437593d4ee Tests for the new datatypes 2016-11-02 10:44:35 +05:30
Kovid Goyal
85076d3012 Implement add combining char 2016-11-01 19:04:38 +05:30
Kovid Goyal
c069d40ffe repr for Line 2016-11-01 18:43:55 +05:30
Kovid Goyal
f3944e6289 Implement a Line class 2016-11-01 18:18:12 +05:30
Kovid Goyal
a5368314af ... 2016-10-31 22:51:22 +05:30
Kovid Goyal
1f55af6691 Start work on C implementation of the core data types 2016-10-31 22:09:34 +05:30
Kovid Goyal
4df05d71d6 Nicer message on assert 2016-10-21 10:02:25 +05:30
Kovid Goyal
067662de94 Sanitize title and icon names 2016-10-21 03:53:31 +05:30
Kovid Goyal
5bd728fe2f ... 2016-10-21 00:05:50 +05:30
Kovid Goyal
d95383fa43 Dont mark cells the cursor leaves as dirty 2016-10-20 05:29:32 +05:30
Kovid Goyal
b354e95401 Implement cursor movement APIs 2016-10-19 20:15:07 +05:30
Kovid Goyal
fea7c2dcb0 Implement erase_in_screen() 2016-10-19 13:49:27 +05:30
Kovid Goyal
56bff2f4a7 Implement character manipulation APIs 2016-10-19 11:25:55 +05:30
Kovid Goyal
3ae0e4e5ac Add support for unicode combining chars and wide chars 2016-10-18 20:30:18 +05:30
Kovid Goyal
355bfce189 Implement the fast draw path for single width characters 2016-10-18 11:04:30 +05:30
Kovid Goyal
44e8238eaf API to set text in Line efficiently 2016-10-17 13:50:53 +05:30
Kovid Goyal
f345ac1bdd A function to efficiently check for the common case pure ascii strings 2016-10-17 09:11:10 +05:30
Kovid Goyal
2b3855eea9 More efficient memory layout for Line 2016-10-17 08:24:16 +05:30
Kovid Goyal
9de6387e58 Finish tests for Line and Cursor 2016-10-17 07:05:54 +05:30
Kovid Goyal
e08385f991 Test for apply_cursor and cursor_from 2016-10-16 22:44:30 +05:30
Kovid Goyal
b9c15ef8e3 Tests for Cursor 2016-10-16 20:47:00 +05:30
Kovid Goyal
adaf748852 Framework for testing 2016-10-16 20:36:27 +05:30