Johan Walles
ba213b82c3
Handle cut off lines on Windows
...
Before this change, on Windows, the rightmost column of the screen would
be cut off and not visible.
With this change in place, that column should now be visible.
Fixes https://github.com/walles/moar/issues/250 .
Ref:
https://github.com/microsoft/terminal/issues/18115#issuecomment-2448054645
2024-10-30 20:38:57 +01:00
Johan Walles
3a4c54ed5e
Assume 16 colors mean VGA palette
...
I can't see any other reason for telling moar to use 16 colors than if
your hardware actually can't do more. And that means VGA.
2024-10-05 08:12:47 +02:00
Johan Walles
f48a1b4084
Add a missing note
2024-09-21 08:14:36 +02:00
Johan Walles
189e622658
Simplify last-cell-on-a-row-is-wide handling
...
By doing the clipping in SetCell(). This is less intrusive than doing it
in renderLine().
2024-09-20 08:04:56 +02:00
Johan Walles
331646da90
Don't render hidden runes
...
The same test is still failing, and no scroll-right markers are visible
even though they should, at least for the sample ps.txt file.
2024-09-20 06:56:48 +02:00
Johan Walles
e3b50a0845
Support setting wide characters on screen
2024-09-19 19:48:46 +02:00
Johan Walles
769f6549db
WIP: Make scroll indicators wide char aware
...
And fail some tests, needs fixing.
2024-09-17 19:45:50 +02:00
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