Mitchell Hashimoto
a162c7c47f
inspector: move inspector to dedicated folder
2023-10-24 15:27:16 -07:00
Mitchell Hashimoto
5a299e14e4
all threads are notified of inspector state, trigger render
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
7a30d1080e
core: hook up all the inspector activation state and such
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
a5066635f0
renderer: do not downsample oversized glyphs
...
Fixes #696
We should rely on the rasterizer to create glyphs of the proper size,
including doing CPU resizing if necessary.
2023-10-17 10:55:04 -07:00
Mitchell Hashimoto
ab35a21dc2
renderer: render cursor behind colored emoji
2023-10-16 12:57:23 -07:00
Mitchell Hashimoto
0918731d9a
renderer/metal: need to set proper alpha for fg mode in shader
...
Fixes #673
2023-10-16 12:22:51 -07:00
Mitchell Hashimoto
78b5c1db77
renderer: handle error.NotFound for timer cancellation
...
Fixes #685
This is expected in very rare scenarios where under heavy load, a timer
could complete before a cancellation request is processed, resulting in
a "not found".
2023-10-15 21:35:13 -07:00
Mitchell Hashimoto
b4070eb67e
renderer: unfocused cursor should always be fully opaque
2023-10-14 14:11:15 -07:00
Mitchell Hashimoto
ff38d3e358
config: add cursor-opacity
2023-10-14 14:08:06 -07:00
Mitchell Hashimoto
7167cf9054
renderer: default cursor color to foreground
...
Fixes #667
2023-10-14 14:02:17 -07:00
Mitchell Hashimoto
4f5a05e087
renderer: render cursor over wide character if on tail part
2023-10-13 14:39:10 -07:00
Mitchell Hashimoto
7995d44cfb
font: render sprites with a configurable grid cell width
...
Fixes #666
2023-10-13 14:31:55 -07:00
Mitchell Hashimoto
b98cc3d79f
config: add remaining font modifiers
2023-10-04 22:08:19 -07:00
Mitchell Hashimoto
2b28106837
update zig
2023-10-02 08:18:35 -07:00
Mitchell Hashimoto
5c1fbd09cd
font: shaper dynamically allocates cell buffer
...
Pathlogical grapheme clusters can use a LOT of memory, so we need to be
able to grow.
2023-09-26 17:59:16 -07:00
Mitchell Hashimoto
b1389cbbfe
renderer: support font style changing at runtime
2023-09-26 08:51:04 -07:00
Mitchell Hashimoto
4b791f3ee1
renderer: always reset font group on config change
2023-09-26 08:18:11 -07:00
Mitchell Hashimoto
4b8056afd8
renderer/opengl: remove gpucell lru cache
...
There was no noticable performance improvement and it complicated the
code and also diverged it from Metal.
2023-09-22 09:47:01 -07:00
Mitchell Hashimoto
bebf6bb108
renderer/opengl: only skip drawing cells if they're empty, not clear
...
Fixes #518
This optimization to avoid a draw call to OpenGL was premature. This
optimization is fine but needs to happen only for the draw calls. We
still need to clear the screen if we have no cells.
This was causing #518 because when the cursor was blinked (invisible)
then we had no cells so we'd skip the draw call which reused the old
buffer state for OpenGL.
2023-09-22 09:45:26 -07:00
Mitchell Hashimoto
0cf2ed6a9f
renderer/opengl: gl state init needs to set blending, realization
2023-09-16 11:26:07 -07:00
Mitchell Hashimoto
a19acf14d2
renderer/opengl: support reloading the Opengl state
2023-09-16 09:37:29 -07:00
Mitchell Hashimoto
58100f0a00
renderer/opengl: OpenGL state may be nil to disable rendering
2023-09-16 09:08:35 -07:00
Mitchell Hashimoto
10989ae7b0
renderer: implement underline cursor
2023-09-10 22:05:47 -07:00
Mitchell Hashimoto
8b26e93cb5
renderer: update some code comments
2023-09-10 12:18:38 -07:00
Mitchell Hashimoto
afacc2ca9e
renderer: cursor style unit tests
2023-09-09 20:48:56 -07:00
Mitchell Hashimoto
3583a0c1ca
renderer/opengl: new cursor apis
2023-09-09 20:37:56 -07:00
Mitchell Hashimoto
d9cfd00e9f
Big Cursor State Refactor
...
This makes a few major changes:
- cursor style on terminal is single source of stylistic truth
- cursor style is split between style and style request
- cursor blinking is handled by the renderer thread
- cursor style/visibility is no longer stored as persistent state on
renderers
- cursor style computation is extracted to be shared by all renderers
- mode 12 "cursor_blinking" is now source of truth on whether blinking
is enabled or not
- CSI q and mode 12 are synced like xterm
2023-09-09 20:19:37 -07:00
Mitchell Hashimoto
a6c40d0417
renderer: always show cursor if window is not focused
...
Fixes #400
This ensures the hollow box is shown even if the cursor is not in a
blinking state when unfocus happens. We still hide the cursor even on
unfocus if the terminal mode explictly asks for a hidden cursor.
2023-09-06 11:23:42 -07:00
SoraTenshi
6faed268e0
config: clean up cursor style configuration
2023-09-03 07:51:36 -07:00
Mitchell Hashimoto
22eb533473
content scale change events should also impact viewport padding
...
This calculates the new padding pixel values and propogates those
changes to the renderer.
2023-09-02 11:00:51 -07:00
Mitchell Hashimoto
e2fae7ab2b
surface should default to default cursor, blinking should check selected
2023-08-30 08:12:38 -07:00
Mitchell Hashimoto
ae0de7bce4
renderer: split ligature around cursor even if cursor is flashing
...
Fixes #356
2023-08-29 13:49:14 -07:00
Mitchell Hashimoto
0204d94921
Merge pull request #349 from mitchellh/sync
...
Synchronized Output Sequence
2023-08-28 13:15:50 -07:00
Mitchell Hashimoto
5168dc7645
renderer: do not render if synchronized output is on
2023-08-28 11:38:11 -07:00
SoraTenshi
fcf1537f82
config: Add option for custom cursor style
2023-08-28 18:20:45 +02:00
Kevin Hovsäter
8b9a11db4b
Implement cursor text in addition to color
2023-08-26 15:29:48 +02:00
Mitchell Hashimoto
e0ee5d1763
Revert "Merge pull request #322 from mitchellh/big-glyphs"
...
This reverts commit 0ffbab00a42ba0fb9a3f2aa02428760df61d03d3, reversing
changes made to 6751087bead34efe1684997503c3764a63607397.
2023-08-24 21:05:33 -07:00
Mitchell Hashimoto
aad4bdb32a
renderer/opengl: glyphs that are too wide should be scaled down
...
U+226A is 1-char wide according to the Unicode database but renders very
wide in many fonts. This causes it to leak outside of its grid cell. We
should scale down by x the same way we scale down by y.
2023-08-24 14:19:38 -07:00
Mitchell Hashimoto
135250018e
terminal/kitty-gfx: get rid of selection
2023-08-23 11:41:49 -07:00
Mitchell Hashimoto
4b38fb96db
terminal/kitty-gfx: honor "z" setting
2023-08-23 09:55:13 -07:00
Mitchell Hashimoto
7ff76ca00d
terminal/kitty-gfx: respect display c/r params
2023-08-22 14:43:50 -07:00
Mitchell Hashimoto
3bbfee676b
terminal/kitty-gfx: process source rectangle display params
2023-08-22 14:33:41 -07:00
Mitchell Hashimoto
84c72bbe46
renderer/metal: honor cell offset graphics command
2023-08-22 13:28:40 -07:00
Mitchell Hashimoto
e4e952d077
renderer/metal: image should always be rendered at desired x
2023-08-22 12:24:58 -07:00
Mitchell Hashimoto
5a9bbcbc2d
renderer/metal: clip image if necessary off top of viewport (scrolling)
2023-08-22 11:32:45 -07:00
Mitchell Hashimoto
53b25d0ecc
renderer/metal: set correct x/y for image
2023-08-22 10:14:57 -07:00
Mitchell Hashimoto
cb70d86c00
renderer/metal: emit draw calls for images
2023-08-22 10:12:40 -07:00
Mitchell Hashimoto
e665fc6741
renderer/metal: first pass at an image shader
2023-08-22 09:20:30 -07:00
Mitchell Hashimoto
5229cb93d2
renderer/metal: extract helpers for shaders/buffers
2023-08-22 08:49:34 -07:00
Mitchell Hashimoto
da4ead8f60
renderer/metal: deallocate unused image textures
2023-08-21 22:11:58 -07:00