cryptocode
6045088afc
Don't show hollow cursor in inactive windows when cursor is hidden.
...
This is the behavior of the other terminals I have, such as iTerm, allcritty, WezTerm, and Kitty. The hollow cursor is especially noticable when running in two panes,
one of them inactive with animations (such as a progress bar)
2023-08-11 17:20:03 +02:00
Mitchell Hashimoto
70efaea787
Merge pull request #269 from mitchellh/ignore-char-control
...
do not process charCallback if control character was processed
2023-08-10 12:19:58 -07:00
Mitchell Hashimoto
68cb3288be
do not process charCallback if control character was processed
...
Fixes #267
We have a mechanism `ignore_char` to ignore the `charCallback` exactly
once. It is guaranteed by all app runtimes that `keyCallback` is called
before `charCallback` and that they're called in order by key press
(you'll never get 3 `keyCallbacks` and then `charCallback` for the first
press).
We use this for example to ensure that if you bind `a` to something,
that we never actually print 'a', since the binding consumes it.
This commit sets `ignore_char` whenever we detect a key that should be
translated to a control character and written to the pty. As the comment
in the code states: we probably should've been doing this anyways. It is
a complete mystery why macOS behaves the way it does that caused us to
figure this out.
2023-08-10 11:51:11 -07:00
Mitchell Hashimoto
2704b54bc5
warn if the binary is a debug build
2023-08-09 15:18:35 -07:00
Mitchell Hashimoto
7b33ee6b71
Merge pull request #266 from mitchellh/primary-clipboard
...
Primary (selection) clipboard support
2023-08-09 15:14:59 -07:00
Mitchell Hashimoto
ecb9563f2a
apprt/glfw: warn that the macos version has bugs
2023-08-09 15:14:39 -07:00
Mitchell Hashimoto
688ab84661
apprt/embedded: allow noting that selection clipboard is not supported
2023-08-09 14:52:22 -07:00
Mitchell Hashimoto
5d6086a1b1
"copy-on-select" configuation to disable
2023-08-09 14:44:24 -07:00
Mitchell Hashimoto
afc6a9976f
apprt/embedded: support selection clipboard
2023-08-09 14:29:39 -07:00
Mitchell Hashimoto
ca008df73d
apprt/glfw: support primary clipboard
2023-08-09 14:22:17 -07:00
Mitchell Hashimoto
f012b908b7
apprt/gtk: use glfw for reading primary clipboard (see comment)
2023-08-09 14:17:03 -07:00
Mitchell Hashimoto
347c60d9bd
selection copies to the selection clipboard
2023-08-09 14:00:48 -07:00
Mitchell Hashimoto
f3996ff0f8
apprt: primary clipboard awareness (selection clipboard)
2023-08-09 13:41:22 -07:00
Mitchell Hashimoto
232bffe338
Merge pull request #264 from moderation/main
...
gtk: apply background opacity
2023-08-09 12:38:13 -07:00
moderation
b33b2bb6a4
gtk: apply background opacity
...
Signed-off-by: moderation <michael@sooper.org>
2023-08-09 12:03:05 -07:00
Mitchell Hashimoto
1bb5158185
Merge pull request #263 from mitchellh/mrn/gtk-fix-up-arrow
...
gtk: fix arrow-up stealing focus
2023-08-09 11:17:11 -07:00
Thorsten Ball
147d5b0f3e
gtk: fix arrow-up stealing focus
...
This fixes #253 -- with essentially a single line! Just took me a while
to find out where to add this line.
Turns out we already solved this problem for `<Tab>` so now we do the
same thing for `<Up>`: we tell the `GtkApplication` we handled the event
so it doesn't propagate any further.
2023-08-09 20:11:03 +02:00
Mitchell Hashimoto
0ff390919a
Merge pull request #262 from mitchellh/split-writes
...
update libxev to fix split writes on large writes (i.e. big paste)
2023-08-09 10:17:36 -07:00
Mitchell Hashimoto
6cf22f841c
ctrl+backspace should send 0x08
...
Fixes #260
2023-08-09 10:16:23 -07:00
Mitchell Hashimoto
e15b5ab42c
fix error set for libxev cross-platform
2023-08-09 10:05:48 -07:00
Mitchell Hashimoto
e33f6c71de
update libxev to fix split writes on large writes (i.e. big paste)
...
Fixes #258
This was an upstream bug in libxev where partial the queueWrite
mechanism would not correctly handle partial write results:
https://github.com/mitchellh/libxev/pull/60
2023-08-09 08:18:43 -07:00
Mitchell Hashimoto
5854be9855
Merge pull request #261 from mitchellh/scroll-page
...
scroll keybindings: top, bottom, page up, page down, page fractional
2023-08-09 07:49:33 -07:00
Mitchell Hashimoto
2fb8ad8196
linux default keybindings for scroll top, bot, page up, down
2023-08-09 07:40:55 -07:00
Mitchell Hashimoto
0ed76b4300
scroll_page_fractional keybinding
2023-08-09 07:37:18 -07:00
Mitchell Hashimoto
a8380e937d
scroll top, bot, page up, page down binding actions
2023-08-09 07:24:11 -07:00
Mitchell Hashimoto
2c140b5a22
Merge pull request #257 from mitchellh/pckeys
...
bind sequences for PC style function keys from xterm
2023-08-08 16:45:36 -07:00
Mitchell Hashimoto
7ac61469c9
bind sequences for PC style function keys from xterm
...
Fixes #256
This makes a whole lot more sequences work, such as `ctrl+left`,
`ctrl+shift+f1`, etc. We were just missing these completely.
This also found an issue where if you split a sequence across two
`write()` syscalls, then `/bin/sh` (I didn't test other shells)
treats it as two literals rather than parsing as a single sequence.
Great.
2023-08-08 16:43:27 -07:00
Mitchell Hashimoto
591bd3c719
Merge pull request #252 from mitchellh/caps
...
keyboard bindings should never take caps/num lock into account
2023-08-08 11:01:33 -07:00
Mitchell Hashimoto
bfe6cfeb1a
keyboard bindings should never take caps/num lock into account
2023-08-08 10:58:05 -07:00
Mitchell Hashimoto
a295d1e872
revert back to nix 22.11, see comment
2023-08-08 10:32:49 -07:00
Mitchell Hashimoto
0fafed7b21
Merge pull request #251 from mitchellh/resources-dir
...
gtk: app icon
2023-08-08 09:59:07 -07:00
Mitchell Hashimoto
42735bd0e0
apprt/embedded: new resources dir api
2023-08-08 09:55:23 -07:00
Mitchell Hashimoto
e93a6eb2e4
apprt/gtk: set icon name
2023-08-08 09:44:11 -07:00
Mitchell Hashimoto
6b45d931c3
plumb through the resources dir to termio
2023-08-08 09:29:38 -07:00
Mitchell Hashimoto
bd7cc4b71d
core: App looks up resources dir on startup
2023-08-08 09:21:52 -07:00
Mitchell Hashimoto
4e9dcf6b62
os: add resourcesDir function to find app resource dir
2023-08-08 09:17:14 -07:00
Mitchell Hashimoto
c0f5c0ef41
termio/exec: poll() needs a negative timeout to block 🤡
2023-08-08 09:14:08 -07:00
Mitchell Hashimoto
c2137360f4
update nix to 23.05 ( #250 )
...
* update nix to 23.05
* nix: do not install gdb on macos
2023-08-08 09:01:47 -07:00
Mitchell Hashimoto
8f69a9c55d
Merge pull request #249 from mitchellh/fix-typos
...
Fix typos
2023-08-08 08:09:43 -07:00
Kevin Hovsäter
22b8173164
Fix typos
2023-08-08 14:27:34 +02:00
Mitchell Hashimoto
aff64d9951
Merge pull request #247 from mitchellh/gtk-single-instance
...
GTK single instance, fix UB in termio read thread termination
2023-08-07 21:43:08 -07:00
Mitchell Hashimoto
6d32d74996
apprt/gtk: remove useless calls
2023-08-07 21:15:42 -07:00
Mitchell Hashimoto
e2e876bfa1
termio/exec: make sure that process is dead before killing read thread
2023-08-07 21:13:33 -07:00
Mitchell Hashimoto
b5bb3b3739
termio/exec: if read thread gets 0 bytes then break the tight loop
2023-08-07 21:10:11 -07:00
Mitchell Hashimoto
816cad07b9
termio/exec: set pty fd to non-blocking, try to read as long as possible
2023-08-07 20:55:01 -07:00
Mitchell Hashimoto
f40a90e7aa
termio: use a pipe to notify the reader thread to quit
...
Simultaneously reading and closing a fd is UB. We need to ensure that we
quit, then close.
2023-08-07 20:41:34 -07:00
Mitchell Hashimoto
2e98d43a58
apprt/glfw: launch window on startup
2023-08-07 19:28:48 -07:00
Mitchell Hashimoto
60a36ca5cc
apprt/gtk: enable single instance mode
2023-08-07 19:26:57 -07:00
Mitchell Hashimoto
22296b377a
Revert "Merge pull request #244 from mitchellh/alt-as-esc"
...
This reverts commit c139279d479682c17f63d9b57c2d56608d09d16a, reversing
changes made to 4ed21047a734d7c586debe0026e3b6ea90ed1622.
We do want to do this but this broke bindings.
2023-08-07 17:06:40 -07:00
Mitchell Hashimoto
23935c3563
change sentinel value for resources dir, its different on Linux
2023-08-07 16:16:44 -07:00