Mitchell Hashimoto
dd98768400
note that selectionSlices is tested
2022-08-05 11:40:52 -07:00
Mitchell Hashimoto
d4c4330d4d
copy!
2022-08-05 11:37:02 -07:00
Mitchell Hashimoto
abde2b9e18
way easier way to slice to end of storage duh
2022-08-05 11:21:37 -07:00
Mitchell Hashimoto
ecaca23959
selectionString: test wraparound case, fix bugs
2022-08-05 11:20:53 -07:00
Mitchell Hashimoto
363c51360b
selectionString: more accurate buf allocation
2022-08-05 11:08:56 -07:00
Mitchell Hashimoto
25dc292c14
selectionString unwraps properly
2022-08-05 11:04:41 -07:00
Mitchell Hashimoto
dd76fe124d
terminal.selectionString to grab the string value of a selection
...
This isn't done yet, I still have to handle soft-wrapping and test
wrapped cases in the ring buffer.
2022-08-05 10:57:08 -07:00
Mitchell Hashimoto
0855d391a8
fix selection of a single character
...
This logic is truly terrible and I know for certain there is an easier
way to calculate this. I also know there are some bugs here. But, the
user-facing result is not bad so let's start with this.
2022-08-04 16:53:10 -07:00
Mitchell Hashimoto
68260cc3d0
fix some selection contains logic on single lines
2022-08-04 14:40:28 -07:00
Mitchell Hashimoto
d0dc69a0a8
color selection!
2022-08-04 14:37:10 -07:00
Mitchell Hashimoto
40161a9eff
track mouse state, setup selection state on cursor move with click
2022-08-04 14:21:40 -07:00
Mitchell Hashimoto
f2e9746d2b
fix build error
2022-08-04 13:08:51 -07:00
Mitchell Hashimoto
974138378b
introducing dedicated point types
2022-08-04 13:04:42 -07:00
Mitchell Hashimoto
8facf9b942
terminal: add Selection struct
2022-08-04 11:44:36 -07:00
Mitchell Hashimoto
bb0b95732e
opengl: support extension iteration, list in debug mode
2022-08-04 11:13:56 -07:00
Mitchell Hashimoto
e163e4962b
refactor cursor implementation, implement cursor visible (mode 25)
...
This cleans up a ton of state management around cursor styles,
visibility, blinking, etc. This was long in the tooth and when I was
trying to implement mode 25 I realized it was impossible with the
spaghetti mess I had. This made it really clean.
With this refactor, the Window keeps the "terminal_cursor" field the
proper state, and the render callback properly updates the gpu cells for
the cursor settings.
This also implements mode 25 (cursor visible) which makes neovim not
"flash" when vertically scrolling a vertical split. Neovim does some
cursor stuff but while doing so hides the cursor. This now respects
that.
2022-08-03 21:39:42 -07:00
Mitchell Hashimoto
1680aee880
some logging improvements
2022-08-03 21:13:05 -07:00
Mitchell Hashimoto
befeb08b3d
add a lot more tracing as I hunt down some performance things
2022-08-03 09:56:32 -07:00
Mitchell Hashimoto
0bc8300e74
remove unused line
2022-08-02 21:45:20 -07:00
Mitchell Hashimoto
40cec18943
implement DECSASD by just blackholing the output for now
...
We don't want to support status lines, and if anything sends us status
line information we don't want it to mess up the main display, so just
drop it.
2022-08-02 11:03:01 -07:00
Mitchell Hashimoto
2b80699179
cursor position absolute needs to ignore all the offset stuff
2022-08-02 10:30:20 -07:00
Mitchell Hashimoto
1fbfc8a664
update Zig nightly
2022-08-02 09:27:05 -07:00
Mitchell Hashimoto
84af11e1eb
detect config file load in config file
2022-08-02 09:25:36 -07:00
Mitchell Hashimoto
782ddfe722
--config-file to load a config file
...
The config file is just CLI args one per line.
2022-08-01 18:04:39 -07:00
Mitchell Hashimoto
bf526fb217
cli: support multiple calls into parse without clobbering arena
2022-08-01 12:57:57 -07:00
Mitchell Hashimoto
0249f3c174
cli parsing supports modification, add "RepeatableString" as example
...
This lets values modify themselves, which we use to make a repeatable
string implementation. We will use this initially to specify config
files to load.
2022-08-01 11:54:51 -07:00
Mitchell Hashimoto
2453b40e5d
log glfw errors globally
2022-07-26 13:05:57 -07:00
Mitchell Hashimoto
28acd99d7d
reset inverse attribute
2022-07-26 09:37:52 -07:00
Mitchell Hashimoto
85a9e6fdf0
fix an off by one in set cursor pos
2022-07-25 17:03:20 -07:00
Mitchell Hashimoto
a239098883
index should return after handling bottom-most line in scroll region
2022-07-25 08:08:23 -07:00
Mitchell Hashimoto
d81bb19af6
fix crash we can get with horizontal tabs off the end of the screen
2022-07-24 16:33:57 -07:00
Mitchell Hashimoto
5c8c9d8e3c
support DECCOLM
...
This gets vttest page 1 and page 2 now FULL passing.
We now crash on page 3. This is a lingering bug in our grid code
though and we need to find it anyways so we'll keep the crash in.
2022-07-24 16:06:04 -07:00
Mitchell Hashimoto
a3409ac70d
erase line left should include cursor position
2022-07-24 09:53:21 -07:00
Mitchell Hashimoto
a43c63111f
count = 0 implies 1 for all cursor movement, fixes one line of vttest
2022-07-24 09:38:38 -07:00
Mitchell Hashimoto
6369f1f2f9
big improvements in action logging
2022-07-24 09:20:02 -07:00
Mitchell Hashimoto
4a9b8ea187
add a formatter for CSI logs so that they're more easy to read
2022-07-23 18:13:37 -07:00
Mitchell Hashimoto
dfde2acf10
on resize, make sure we resize the alt screen too
2022-07-22 14:22:53 -07:00
Mitchell Hashimoto
3dbe9cba43
clean up unreachables with log statements
2022-07-22 13:54:16 -07:00
Mitchell Hashimoto
855a71d55c
quiet noisy log
2022-07-22 13:45:51 -07:00
Mitchell Hashimoto
d672bedec7
alternate screen buffer (mode 1049) now supported
2022-07-22 13:36:16 -07:00
Mitchell Hashimoto
5564bd7213
cursor belongs to screen (prep for alternate screen)
2022-07-22 13:08:40 -07:00
Mitchell Hashimoto
f445de7568
CSI: Insert Blanks (ESC [ n @)
2022-07-22 09:58:39 -07:00
Mitchell Hashimoto
6641fcbd4c
add --font-size flag for font size in pixels
2022-07-21 21:35:49 -07:00
Mitchell Hashimoto
fbd79ee585
comment to be clear
2022-07-17 10:06:17 -07:00
Mitchell Hashimoto
baf2f9c1de
index (IND) handles scroll up properly with a scrolling region set
...
This makes vttest slightly closer.
2022-07-15 17:01:03 -07:00
Mitchell Hashimoto
8dbb6343f4
KIND OF handle mode 3 (132 col mode)
...
This gets vttest looking slightly better on test 1, page 4. It still
isn't correct but we're looking better.
2022-07-15 09:34:17 -07:00
Mitchell Hashimoto
1f12577b8c
use packed struct for modes
2022-07-15 09:18:54 -07:00
Mitchell Hashimoto
3655609886
fix tab behavior, should not print
2022-07-14 13:43:38 -07:00
Mitchell Hashimoto
da622abd77
don't draw cursor on scroll
2022-07-12 21:10:35 -07:00
Mitchell Hashimoto
dcc5fe34cf
typing jumps scroll to bottom
2022-07-12 21:07:58 -07:00