8161 Commits

Author SHA1 Message Date
Mitchell Hashimoto
e24dabd67a extract out message data from termio
This will be used for other mailboxes, for example this is required for
sending the window title to the app thread. Right now we hardcode an
array size but we can do better than that.
2022-11-15 13:41:11 -08:00
Mitchell Hashimoto
18bc5b2e9a No need to use a mach fork anymore 2022-11-15 13:24:15 -08:00
Mitchell Hashimoto
78fbf9cb06 remove stage1 workarounds 2022-11-15 13:19:01 -08:00
Mitchell Hashimoto
4727fa9b7b move opengl to renderer dir 2022-11-15 13:12:30 -08:00
Mitchell Hashimoto
18de7cd2ef Move shaders into the renderer dir 2022-11-15 13:10:43 -08:00
Mitchell Hashimoto
2a88ebd94e Merge pull request #33 from mitchellh/padding-cfg
Explicit Padding Configuration
2022-11-14 17:44:14 -08:00
Mitchell Hashimoto
334743e8a7 Don't crash on huge padding, warn users if padding is absurd 2022-11-14 17:41:15 -08:00
Mitchell Hashimoto
e6c7fd0214 metal: understand explicit padding 2022-11-14 17:35:10 -08:00
Mitchell Hashimoto
860fbc3aee padding needs to be sent to termio 2022-11-14 17:25:35 -08:00
Mitchell Hashimoto
d7d12d9469 explicit padding works 2022-11-14 17:13:56 -08:00
Mitchell Hashimoto
c515cb9b5f initial padding options 2022-11-14 16:19:20 -08:00
Mitchell Hashimoto
f169ab3f24 Merge pull request #32 from mitchellh/auto-pad
Balanced Viewport Margins/Padding
2022-11-14 15:59:43 -08:00
Mitchell Hashimoto
184b43ebd6 opengl: padding is done via ortho matrix rather than viewport 2022-11-14 13:13:50 -08:00
Mitchell Hashimoto
4cab24a3da extract auto-padding code to shared logic 2022-11-14 13:10:12 -08:00
Mitchell Hashimoto
024cd65ac8 metal: implement auto padding 2022-11-14 12:37:29 -08:00
Mitchell Hashimoto
f73753ac6f opengl: automatically pad render area to balance non-grid space 2022-11-14 12:24:38 -08:00
Mitchell Hashimoto
4ced2290b3 OSC handling, handle OSC change window title command 2022-11-14 10:46:40 -08:00
Mitchell Hashimoto
56504a342f better commenting 2022-11-14 10:03:39 -08:00
Mitchell Hashimoto
20cbee5370 locale always requires libc 2022-11-14 10:02:48 -08:00
Mitchell Hashimoto
ad203db6e4 set COLORTERM -- macOS uses this for emoji 2022-11-14 10:00:38 -08:00
Mitchell Hashimoto
f39484541f set system locale on startup, read Mac locale from OS preferences 2022-11-14 09:59:22 -08:00
Mitchell Hashimoto
69b91a951b pkg/objc: autorelease pools 2022-11-14 09:59:09 -08:00
Mitchell Hashimoto
b4eef60380 update TODO 2022-11-13 22:16:40 -08:00
Mitchell Hashimoto
99224ae2c0 implement CSI ESC [ <n> b for repeating previously printed char 2022-11-13 22:07:40 -08:00
Mitchell Hashimoto
feccd550c3 implement many more reset sgr attributes 2022-11-13 21:54:26 -08:00
Mitchell Hashimoto
23e7b8d63e The cursor should be reset on entering the alt screen 2022-11-13 21:43:59 -08:00
Mitchell Hashimoto
019f1e34bb metal: copy screen data (see opengl commit for why) 2022-11-13 17:29:23 -08:00
Mitchell Hashimoto
3fcdd9a196 fix outdated test 2022-11-13 16:25:50 -08:00
Mitchell Hashimoto
333ff1e634 opengl: handle screen resize outside of critical area 2022-11-13 16:19:38 -08:00
Mitchell Hashimoto
f1c69343d3 opengl: copy screen data instead of sharing state
Through benchmarking I've determined this lowers lock contention by
about 50% on the critical data.
2022-11-13 16:16:08 -08:00
Mitchell Hashimoto
81fbc94b3c Add a benchmark exe for testing parser throughput 2022-11-13 11:29:05 -08:00
Mitchell Hashimoto
445ca8998f cli args without arena 2022-11-13 11:21:12 -08:00
Mitchell Hashimoto
3e92ec5ccd update zig 2022-11-09 17:42:33 -08:00
Mitchell Hashimoto
ce85d9a2cd add more tracing, unroll a loop 2022-11-08 19:15:14 -08:00
Mitchell Hashimoto
d1718e6cbf use libc memcpy/memmove instead of std.mem if available 2022-11-08 19:01:45 -08:00
Mitchell Hashimoto
a471eaf980 drop a couple function calls and optimize scrolling a bit 2022-11-08 18:35:19 -08:00
Mitchell Hashimoto
306ab947e7 implement region scrolling directly in screen to use memcpy
This doubles scroll region scrolling speed.
2022-11-08 17:35:15 -08:00
Mitchell Hashimoto
4b2f2a81db update TODO 2022-11-08 14:01:47 -08:00
Mitchell Hashimoto
8a871e1294 missing trace 2022-11-08 13:57:12 -08:00
Mitchell Hashimoto
c1a9184ebd sgr: parse italic (render not implemented) 2022-11-07 14:04:40 -08:00
Mitchell Hashimoto
73c4395fc2 add more traces 2022-11-07 07:59:47 -08:00
Mitchell Hashimoto
5b52333e51 name threads and add more tracing 2022-11-07 07:45:46 -08:00
Mitchell Hashimoto
46a9998762 tracy: support naming threads 2022-11-07 07:33:36 -08:00
Mitchell Hashimoto
7b94153458 libuv: Prepare handles 2022-11-07 07:33:29 -08:00
Mitchell Hashimoto
9ee5a5c715 implement ESC c -- full reset 2022-11-06 18:59:17 -08:00
Mitchell Hashimoto
e7c5cbf758 throttle cursor reset, under heavy IO this would slow things down 2022-11-06 18:44:35 -08:00
Mitchell Hashimoto
f6a3840c5b update zig 2022-11-06 17:44:21 -08:00
Mitchell Hashimoto
25f2c27e4b update TODO 2022-11-06 17:41:27 -08:00
Mitchell Hashimoto
62a3419e81 Multi-Window
This adds the ability to have multiple windows by introducing new keybind actions `new_window`, `close_window`, and `quit`. These are bound on macOS by default to the standard `cmd+n`, `cmd+w`, and `cmd+q`, respectively.

The multi-window logic is absolutely minimal: we don't do any GPU data sharing between windows, so each window recreates a full font texture for example. We can continue to further optimize this in the future.

DevMode is also pretty limited (arguably broken) with multi-window: DevMode only works on the _first_ window opened. If you close the first window, DevMode is no longer available. This is due to complexities around multi-threading and imgui. It is possible to fix this but I deferred it since it was a bit of a mess!
2022-11-06 17:31:19 -08:00
Mitchell Hashimoto
c602820dc9 Set proper keybinds 2022-11-06 17:27:17 -08:00