Johan Walles
5295602e42
Implement rune width measuring
2024-09-15 14:17:41 +02:00
Johan Walles
9c858a7ecb
Add a rune width test
2024-09-15 14:13:16 +02:00
Johan Walles
e0e9ee6610
Start telling screen cells from styled runes
...
One rune can cover multiple screen cells.
2024-09-15 13:56:50 +02:00
Johan Walles
a67c887554
Include stack trace in panic logs
2024-08-12 21:47:46 +02:00
Johan Walles
d9b3e16e00
Render underline color changes
2024-08-12 20:44:40 +02:00
Johan Walles
2c9f16fa2a
Add underline color support to Style
2024-08-12 20:39:48 +02:00
Johan Walles
43f17ebe7b
Remove no-longer-needed code
2024-08-12 20:31:11 +02:00
Johan Walles
f26ae4ff9a
Introduce colorType to ansiString
2024-08-12 20:25:53 +02:00
Johan Walles
44136f6524
More renaming, forgot some things
2024-08-12 18:53:44 +02:00
Johan Walles
42b0bc7e25
Improve naming
2024-08-12 18:36:49 +02:00
Johan Walles
6cf1223634
Catch errors in goroutines and log them
2024-08-10 08:40:48 +02:00
Johan Walles
25c79625d5
Fill out the test a bit
2024-07-17 08:02:32 +02:00
Johan Walles
cec3daaf88
Mutexes not needed
2024-07-17 07:59:42 +02:00
Johan Walles
818c5229c0
Add a just-read test
2024-07-17 07:59:20 +02:00
Johan Walles
c89cecddd8
Fix a test failure on Windows
2024-07-17 00:40:57 +02:00
Johan Walles
0091a15268
Test the fancy interruptable reader
...
And add hints for any future Windows implementation.
2024-07-17 00:38:31 +02:00
Johan Walles
b77151e6b1
Add another test for the InterruptableReader
2024-07-17 00:24:50 +02:00
Johan Walles
002d188b49
Start adding tests for the interruptable reader
2024-07-17 00:18:36 +02:00
Johan Walles
f4fed36bfd
Fix a hang
...
Before this change, if select() returned EINTR we would hang.
This change:
* Makes us ignore EINTRs and try again
* Makes sure to not hang, even if the twin main loop would fail for some
other reason.
2024-07-15 20:30:47 +02:00
Johan Walles
00bb910b6f
Provide implementation hints for Windows
2024-07-14 12:25:17 +02:00
Johan Walles
45480cf702
Don't start new reads when shutting down
2024-07-14 12:14:59 +02:00
Johan Walles
9c60483a35
Let Interrupt() wait for reader to react
2024-07-14 12:13:19 +02:00
Johan Walles
d3ed780152
Do fancy shutdown handling on Unix
2024-07-14 12:07:30 +02:00
Johan Walles
e0729105d6
Implement naive shutdown on Unix as well
2024-07-14 11:37:36 +02:00
Johan Walles
c30fb6d5a1
Do the platform agnostic part
2024-07-14 11:26:10 +02:00
Johan Walles
3543b2ca5f
Forgot this in the last commit
2024-06-30 09:09:38 +02:00
Johan Walles
f9e5031cbe
Safer shutdown
...
Now without closing stdin. That closing may or may not have been causing
problems on Windows.
2024-06-30 08:25:48 +02:00
Johan Walles
b2b69852e2
Make Windows screen shutdown more robust
...
Relates to <https://github.com/walles/moar/issues/217 >
2024-06-29 13:32:12 +02:00
Johan Walles
2aa84811dc
Support editing piped input
...
By writing it to a file and opening the editor on that file.
Related to https://github.com/walles/moar/issues/211 .
2024-06-28 06:57:26 +02:00
Johan Walles
83dffa6e1f
Make shutdown more reliable
...
At least I hope it is...
2024-06-24 20:05:34 +02:00
Johan Walles
69bef3097c
Fix crash on --quit-if-one-screen by dupping stdout
2024-06-24 07:26:42 +02:00
Johan Walles
e73a70a4bd
Fix terminal editor lagginess
...
After pressing 'v'.
By stopping our main loop before launching the editor.
Before this change our main loop was still running, stealing events from
stdin and the launched editor.
Fixes #213 .
2024-06-23 12:41:31 +02:00
Johan Walles
f1e886624e
Mouse copying in VSCode and IntelliJ
...
Selecting text now works by default with these terminals.
2024-05-06 06:48:59 +02:00
Wallunen
e5a600b51d
Use 24-bit color if COLORTERM=truecolor
is in the environment
2024-02-10 02:56:00 +02:00
m154k1
23ec0e3816
Use the "select" mouse mode on Rio
2024-01-27 00:30:54 +02:00
Johan Walles
b18dd4f943
Only request terminal bg if needed
...
Fixes #190 and #191 .
4 realz.
2024-01-20 08:34:59 +01:00
Johan Walles
1249f08c10
Probe terminal colors on the alt screen
...
This may or may not prevent #190 and #191 .
2024-01-19 22:27:23 +01:00
Johan Walles
cc665778e1
Support another terminal color response format
...
Related to (but I can't see how this would fix) #190 .
2024-01-18 21:36:16 +01:00
Johan Walles
0d504e950d
Cosmetics
2024-01-13 12:43:29 +01:00
Johan Walles
30c40dc0a7
Get terminal background color asynchronously
2024-01-13 12:36:26 +01:00
Johan Walles
0ddefbdeb7
Move background color detection code into twin
2024-01-13 11:52:01 +01:00
Johan Walles
f6571b3942
Improve color downsampling
...
Tested on the green-gradient.txt sample file, looks much better after
this change.
2024-01-12 15:01:37 +01:00
Johan Walles
ba00295011
Render non-breaking spaces
...
As spaces. Go's unicode.IsPrint() doesn't consider them printable, but
they are just spaces so we should print them anyway.
Just tested this in ITerm2 and it works fine.
2024-01-11 09:33:23 +01:00
Zack Cerza
06c13120d0
Use the "select" mouse mode on WezTerm
2024-01-03 10:40:49 -07:00
Johan Walles
ff74c2d27c
Handle warnings in twin
2024-01-01 13:39:30 +01:00
Johan Walles
e80c60439b
Revert "Merge branch 'johan/ui-colors-from-chroma'"
...
This reverts commit ed491742a1
, reversing
changes made to 12f316f8c8
.
Before this goes in, we should first auto detect bright vs dark terminal
background and default to different themes in those two cases: #67
2023-12-28 18:42:04 +01:00
Johan Walles
a99c17012b
Merge remote-tracking branch 'origin/master' into johan/ui-colors-from-chroma
2023-12-20 18:32:52 +01:00
Johan Walles
b103f0c10b
Drop redundant dependency
...
Chroma already provides enough color handling for our needs.
2023-12-20 18:28:07 +01:00
Johan Walles
22885dc4b0
Test looping over all styles' background colors
2023-12-20 16:15:29 +01:00
Johan Walles
d13e9d4994
Improve naming
2023-12-20 14:59:55 +01:00