diff options
| author | Alex Leferry 2 <alexherbo2@gmail.com> | 2020-06-28 11:59:52 +0200 |
|---|---|---|
| committer | Alex Leferry 2 <alexherbo2@gmail.com> | 2020-06-28 11:59:52 +0200 |
| commit | fb8c7c5bd8ed16435efe7a54563e69b080a08b96 (patch) | |
| tree | 5a4236c13ceff073a8e07db1a0dc1a7d8ba9f7be | |
| parent | 99feddbbf8b53b029ca2bf20558a10c45f0e26ef (diff) | |
commands/buffer: Fix the edit function to attach to terminal
| -rwxr-xr-x | rc/paths/commands/buffer | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rc/paths/commands/buffer b/rc/paths/commands/buffer index 0bf9df0..b4b7228 100755 --- a/rc/paths/commands/buffer +++ b/rc/paths/commands/buffer @@ -24,7 +24,13 @@ edit() { kak_quoted_buffer=$(kak_escape "$buffer") commands="buffer $kak_quoted_buffer; $commands" done - send "$commands" + # Attach to terminal. + # Ensure there is a terminal. + if test -t 1 -a "$KAKOUNE_CONNECT_ATTACH" = true; then + kak -c "$KAKOUNE_SESSION" -e "$commands" + else + send "$commands" + fi } main "$@" |
