157 Commits

Author SHA1 Message Date
Mitchell Hashimoto
77851b30a2 Revert "update to latest Zig nightly"
This reverts commit f3f2c3df268db905b6af6588e5e5008da0f48b60.
2022-09-14 19:39:10 -07:00
Mitchell Hashimoto
f3f2c3df26 update to latest Zig nightly 2022-09-14 19:34:19 -07:00
Mitchell Hashimoto
59191b05cd build fontconfig 2022-09-13 14:34:40 -07:00
Mitchell Hashimoto
7ceff79ea9 various methods on Row are grapheme-aware and tested 2022-09-05 09:47:35 -07:00
Mitchell Hashimoto
ac9f9b29d6 bump render to 144hz, slowest 120hz 2022-09-03 22:17:25 -07:00
Mitchell Hashimoto
81b805b8c2 use an arena allocator for tty allocs
libuv always called the alloc cb right before read, and read owns the
buffer. By using an arena, we're probably just reusing the same buffer
over and over again. This should be quite fast.

In tracing, this indeed changes the MTPC on ttyReadAlloc from ~750ns to
~275ns. I'll take it!
2022-09-01 22:48:33 -07:00
Mitchell Hashimoto
73581eee0b small optimizations 2022-09-01 18:36:27 -07:00
Mitchell Hashimoto
30a14d230e process ASCII events manually to avoid function call overhead 2022-09-01 17:53:40 -07:00
Mitchell Hashimoto
77c8ec0a20 the big screen switchover 2022-09-01 00:58:47 -07:00
Mitchell Hashimoto
f1abca51f7 convert src/font to use new pkg/freetype 2022-08-28 22:22:16 -07:00
Mitchell Hashimoto
28e9619361 allow non-printables even if modifiers are pressed 2022-08-28 21:12:58 -07:00
Mitchell Hashimoto
1609c8e775 hook up scroll down and up CSI codes (SD/SU) 2022-08-27 10:46:11 -07:00
Mitchell Hashimoto
bee82d58dc Shift Out/Shift In (invoke charset into GL) 2022-08-27 10:08:01 -07:00
Mitchell Hashimoto
7626f194e9 basic charset mapping, support configuration, print tests 2022-08-27 09:42:05 -07:00
Mitchell Hashimoto
ff460887b5 fix miscompilation around sgr mode 2022-08-26 15:07:22 -07:00
Mitchell Hashimoto
fe6ba02709 sgr pixels mouse report format 2022-08-26 14:59:44 -07:00
Mitchell Hashimoto
1039ad76bf urxvt reporting format 2022-08-26 14:57:35 -07:00
Mitchell Hashimoto
f551c0ef66 SGR reporting 2022-08-26 14:55:18 -07:00
Mitchell Hashimoto
b46fe522d5 UTF-8 mouse reporting 2022-08-26 14:42:20 -07:00
Mitchell Hashimoto
ab305add6c any event mouse tracking 2022-08-26 14:26:42 -07:00
Mitchell Hashimoto
bd5dd69538 normal event (motion) mouse tracking 2022-08-26 14:17:42 -07:00
Mitchell Hashimoto
9aa5378ffa Track/cache button state and mods state 2022-08-26 13:55:24 -07:00
Mitchell Hashimoto
a4bab6592d normal events can now track scroll 2022-08-26 12:25:33 -07:00
Mitchell Hashimoto
3096b32f13 mouse normal events in x10 format 2022-08-26 12:17:58 -07:00
Mitchell Hashimoto
93f45af41b X10 click-only mouse reporting 2022-08-26 12:04:54 -07:00
Mitchell Hashimoto
43b7727cf8 change u1 in mode to bool 2022-08-26 11:27:44 -07:00
Mitchell Hashimoto
469515c02b bind function keys (F1 to F12) 2022-08-26 10:27:41 -07:00
Mitchell Hashimoto
c7a5045bd4 missed comment 2022-08-25 16:24:20 -07:00
Mitchell Hashimoto
84b75967a2 scale the cursor position from screen coords to pixels 2022-08-25 16:09:54 -07:00
Mitchell Hashimoto
a9b34b43c5 code for getting physical DPI
we don't need it but I want to put it in Git history
2022-08-25 15:53:29 -07:00
Mitchell Hashimoto
9601920b4d font size is now in font points, determine size based on window DPI 2022-08-25 12:29:28 -07:00
Mitchell Hashimoto
3b5a9caff5 hook up more control keys: home, end, page up, page down 2022-08-24 11:16:36 -07:00
Mitchell Hashimoto
80376ce6da hook up keybindings for copy/paste and arrow keys 2022-08-24 11:08:39 -07:00
Mitchell Hashimoto
e6f09093dd unify non-printables up by bindings 2022-08-24 10:21:27 -07:00
Mitchell Hashimoto
b33268cee3 only handle non-printables on press/release, and BS is 0x7F 2022-08-24 10:18:05 -07:00
Mitchell Hashimoto
622537d665 look up keybindings on keypress, clean up how non-printables are handled 2022-08-24 10:02:13 -07:00
Mitchell Hashimoto
7303909d01 key.Binding and basic parsing 2022-08-23 17:40:36 -07:00
Mitchell Hashimoto
eeaad799e5 get rid of Z buffer stuff
This optimization will take more work, and we already got a lot of the
way there by optimizing how we send data down to the GPU.
2022-08-19 13:48:34 -07:00
Mitchell Hashimoto
73e43b6e64 Grid supports sending partial cell updates to GPU 2022-08-19 12:54:07 -07:00
Mitchell Hashimoto
390d95a5af Enable depth buffer, add depth to shader 2022-08-19 10:07:30 -07:00
Mitchell Hashimoto
b562eec83c erase display complete should scroll to bottom 2022-08-17 17:24:09 -07:00
Mitchell Hashimoto
16f981a48a Typing a character clears selection, scrolls to bottom 2022-08-17 17:23:58 -07:00
Mitchell Hashimoto
2f36d5f715 pkg/tracy 2022-08-17 14:03:49 -07:00
Mitchell Hashimoto
b2192ea8f7 move libuv into pkg 2022-08-16 17:47:44 -07:00
Mitchell Hashimoto
3b7a6b78a7 fix ttyWrite calculation to avoid truncating data
the math was wrong. The easiest way to see this was attempting to paste
a large chunk of text, it'd just skip certain parts and truncate it.
2022-08-15 09:57:38 -07:00
Mitchell Hashimoto
e3ddffdf36 don't scale up OpenGL projection in Retina, use true values
This gets rid of blurriness.
2022-08-09 10:21:23 -07:00
Mitchell Hashimoto
f94f3cb5a4 enable retina on Mac, set OpenGL to pixel size properly
This makes things look a bit better, but trades pixelation for blurry
(still TODO). This also fixes an issue on Retina where if you resize
it'd make the viewport 1/4 of the size. The issue here is that OpenGL
uses pixels and glfw uses screen coordinates for everything. We adapt
the screen coords to pixels properly here.
2022-08-09 10:06:30 -07:00
Mitchell Hashimoto
57cec33303 set a minimum window size
Fixes #4

The currently picked 10x4 is somewhat arbitrary but matches
Terminal.app. We can make this configurable.
2022-08-09 08:59:45 -07:00
Mitchell Hashimoto
1da5ca0a7f mouse xpos/ypos can be negative or larger than window size
When calculating the viewport point, we need to consider this. We clamp
the possible values to [0, width/height - 1]. Fixes #1.
2022-08-06 16:05:32 -07:00
Mitchell Hashimoto
ce6f022a7e cursor should be a hollow rect on unfocus, regression from e163e4962baad09cd2c36be1529dee4fcf1220b0 2022-08-05 19:26:50 -07:00