Commit Graph

408 Commits

Author SHA1 Message Date
Kian-Meng Ang
16b53aa52f
docs: fix typos (#1481) 2022-06-10 23:37:55 +09:00
a-kenji
9544a09786
add: fix a small lint (#1476) 2022-06-10 11:42:47 +02:00
Aram Drevekenin
6d15af04bd chore(version): bump development version 2022-06-07 15:38:56 +02:00
Spyros Roum
496196214a
fix(client): exit client-loop on empty message receive (#1454) 2022-06-06 09:30:26 +02:00
Cosmin Popescu
e1fcf3a6db
feat(scroll): edit scrollback with default editor (#1456)
* initial commit for opening the current buffer in an editor

* fix(editor): take hidden panes into consideration when manipulating tiled grid

* when closing an edit buffer, take the geometry of the replaced buffer from the closed buffer

* if the floating panels are displayed, don't add to hidden panels the current buffer

* strategy changing - put the panels inside a suppressed_panels HashMap instead of hidden_panels

* Revert "strategy changing - put the panels inside a suppressed_panels HashMap instead of hidden_panels"

This reverts commit c52a203a20.

* remove the floating panes by moving them to the tiled_panes in hidden_panels

* feat(edit): open editor to correct line and don't crash when none is set

* formatting

* feat(edit): use suppressed panes

* style(fmt): rustfmt and logs

* style(fmt): clean up unused code

* test(editor): integration test for suppressing/closing suppressed pane

* test(e2e): editor e2e test

* style(fmt): rustfmt

* feat(edit): update ui and setup

* style(fmt): rustfmt

* feat(config): allow configuring scrollback_editor explicitly

* style(fmt): rustfmt

* chore(repo): build after merging

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2022-06-06 09:20:07 +02:00
Cosmin Popescu
76d871294d
feat(actions): dump the terminal screen into a file (#1375)
* Initial commit for fixing #1353

* adding a new line between the lines_above and the viewport

* changes following code review

* implementing a test case for the dump screen

* implemented test case for dump_screen

* better regexp replace

* fixes following code review

* style(api): remove extraneous method in plugin pane

* style(fmt): rustfmt

* style(tests): fix method name

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2022-05-20 11:22:40 +02:00
Thomas Linford
e663ef2db7
fix: ensure pty_writer thread closes (#1422) 2022-05-17 20:29:06 +02:00
Thomas Linford
e8f9559062
fix(pty): paste freeze with large amounts of text (#1383)
add pty writer thread to avoid screen thread blocking on unistd::write
2022-05-16 21:14:57 +02:00
dependabot[bot]
fe9fa2d60a
build(deps): bump log from 0.4.16 to 0.4.17 (#1386)
Bumps [log](https://github.com/rust-lang/log) from 0.4.16 to 0.4.17.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits/0.4.17)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-09 18:32:36 +02:00
Thomas Linford
a62743afe3
fix(mouse): middle or right clicks creating selection (#1372) 2022-05-03 13:03:55 +02:00
Aram Drevekenin
3177542674 chore(version): bump development version 2022-05-02 22:54:23 +02:00
Aram Drevekenin
a7ddfe1acc chore(release): v0.29.1 2022-05-02 22:31:08 +02:00
Thomas Linford
bfa4942c5b
fix(mouse): mouse events not forwarded to plugin panes (#1369)
* fix mouse click and release events not forwarded to plugin panes
2022-05-02 22:06:47 +02:00
Aram Drevekenin
77e9dc93f7 chore(version): bump development version 2022-05-02 14:00:20 +02:00
Thomas Linford
03ffd08ebb
fix(mouse): improve mouse event reporting (#1329)
* fix: do not rebroadcast mouse press events
* fix: do not send generated mouse hold events to applications
* begin selecting only if click is on terminal pane
2022-04-30 18:46:17 +02:00
raphCode
1f4e3d88c8
Fix crash on renaming a floating pane (#1323) (#1357)
* Fix crash on renaming a floating pane (#1323)

* Add rename tests for embedded and floating panes

* docs(changelog): fix floating pane rename
2022-04-29 16:16:53 +02:00
Aram Drevekenin
58d52d40e8
fix(compatibility): adjust saved cursor position on resize (#1362)
* fix(compatibility): adjust saved cursor position on resize

* style(fmt): rustfmt
2022-04-29 11:21:46 +02:00
Aram Drevekenin
640d1058a4
Fix title widechar overflow (#1361)
* fix(ui): make sure wide characters don't cause a title overflow

* style(fmt): rustfmt
2022-04-29 10:30:30 +02:00
Aram Drevekenin
0dc136ec5f
fix(compatibility): respond to bg and fg color ansi queries (#1358)
* fix(compatibility): respond to background/foreground queries

* style(fmt): rustfmt

* style(clippy): make clippy happy

* style(fmt): rustfmt

* style(fmt): remove unused code
2022-04-28 17:26:44 +02:00
Thomas Linford
188febfc05
fix(stability): avoid link handler panic on bad index (#1356)
root cause needs investigating, but for now fix the crash.
2022-04-28 11:45:21 +02:00
Aram Drevekenin
7ba49658f7
fix(ipc): empty ipc msg crash (#1351)
* fix(ipc): recover from corrupted channel state

* style(fmt): rustfmt
2022-04-27 10:44:14 +02:00
Aram Drevekenin
22b68c0654
fix(compatibility): fix crash and don't allow cursor beyond row width (#1349)
* fix(compatibility): fix crash and don't allow cursor beyond row width

* style(fmt): rustfmt
2022-04-26 22:38:54 +02:00
Jae-Heon Ji
f2a7e73687
fix: minor system improvements (#1328) 2022-04-16 16:11:46 +09:00
Thomas Linford
198625b055
feat(copy): add copy_on_select option (#1298)
* feat(copy): add copy_on_select option

with default value of true, keep current behavior of automatically
copying selection to clipboard when done selecting.
with copy_on_select = false, on mouse release the selection remains, and
can be copied with the `Copy` action.

* add example to default.yaml

* add copy action example to default.yaml, cleanup

* fix updated tab tests

* fix selection changing while scrolling after release

* fix clippy warnings
2022-04-16 09:04:06 +02:00
raphCode
d4b8199d02
fix(pty): send SIGHUP instead of SIGTERM when closing a pane (#1320)
SIGHUP correctly states the intention behind sending a signal when a
pane is closed: The controlling terminal is "hung up".
Also, SIGHUP is better suited than SIGTERM since bash ignores the
latter. This led to the zombie processes observed by some users.
Furthermore, SIGHUP has a special meaning in bash's job control, namely
re-sending the signal to all owned jobs before exiting.
2022-04-15 19:47:46 +02:00
Aram Drevekenin
cd99d3a547
fix(compatibility): various ansi fixes (#1324)
* fix(compatibility): rotate scroll region up properly

* fix(compatibility): rotate scroll region down properly

* style(fmt): rustfmt
2022-04-14 11:52:37 +02:00
Aram Drevekenin
bf21442186 chore(version): bump development version 2022-04-13 19:17:09 +02:00
Aram Drevekenin
3a2fee601a chore(package): patch version 2022-04-13 18:46:00 +02:00
Aram Drevekenin
b185f2827f
fix(multiuser): properly clear UI when a user detaches (#1317) 2022-04-13 10:05:38 +02:00
Aram Drevekenin
19adb29be5 feat(signals): support XTWINOPS 14 and 16 (and query the terminal for them on startup and SIGWINCH) (#1316)
* feat(signals): get pixel info from terminal emulator

* feat(signals): query for pixel info on sigwinch

* feat(signals): reply to csi 14t and csi 16t

* style(fmt): rustfmt

* style(comments): remove outdated
2022-04-12 18:07:32 +02:00
Amir Arad
f9278a9ab8
refactor(tab): tiled_pane_grid (#1299)
* use `try_` methods when applicable

* fix bug

* extract commonresize check  logic

* clean unused import
2022-04-12 10:48:10 +02:00
Aram Drevekenin
c08145ef5a
fix(compatibility): single line scroll and other edge cases (#1307) 2022-04-09 13:34:32 +02:00
Aram Drevekenin
bd39891f78
fix(compatibility): keep colors when scrolling (#1305) 2022-04-09 00:00:02 +02:00
Aram Drevekenin
8439198636 chore(version): bump development version 2022-03-31 15:07:18 +02:00
Aram Drevekenin
b4e113c6a4
fix(compatibility): don't crash on invalid state when padding line (#1285) 2022-03-30 09:48:41 +02:00
Thomas Linford
e537ba9b9d
Revert "fix(compatibilty): do not use current cursor style in csi erase display (#1142)" (#1283)
This reverts commit efd2fa412f.
2022-03-29 19:14:15 +02:00
Thomas Linford
303123f9c6
fix(selection): rendering of characters with unset background (#1250)
create cursor with RESET_STYLES instead of empty styles
2022-03-28 20:36:51 +02:00
Aram Drevekenin
6443a727ea
fix(compatibility): ansi scroll down (#1279)
* fix(compatibility): ansi scroll down

* style(fmt): rustfmt
2022-03-28 12:39:54 +02:00
dependabot[bot]
a4ad296875
build(deps): bump log from 0.4.14 to 0.4.16 (#1278)
Bumps [log](https://github.com/rust-lang/log) from 0.4.14 to 0.4.16.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 10:40:45 +02:00
raphCode
bda37c3dd3
fix(tab): catch and report errors about tty I/O (#1051)
Quick and dirty bandaid fix to some server crashes which occur to me lately.
The underlying issue seems to be a race condition somewhere when the shell in the pane
exits and the tty file descriptor becomes invalid, but zellij wants to write/read it?

Bug trigger:
- open some panes
- exit the shells in the panes by spamming Ctrl-D

works best when the system only runs on a single CPU, run the following to disable all
cores but one:
echo 0 | sudo tee /sys/devices/system/cpu/cpu*/online

Co-authored-by: raphTec <git@raphtec.net>
2022-03-25 16:30:32 +01:00
Aram Drevekenin
b5cb5474bb
fix(screen): crash in intermediate no-tabs state (#1272)
* fix(screen): log error instead of crashing in intermediate state with no active tabs

* style(fmt): rustfmt
2022-03-25 15:41:08 +01:00
Aram Drevekenin
bf4f90d694
fix(screen): handle various edge cases rather than crashing (#1269)
* fix(screen): handle various edge cases rather than crashing

* style(fmt): rustfmt

* fix(logging): add error logs when unable to find tab

* style(fmt): rustfmt
2022-03-25 10:35:45 +01:00
Aram Drevekenin
f5a3d8f301
fix(tab): floating panes embed/fullscreen and frame color (#1267)
* fix(tab): floating panes embed/fullscreen and frame color

* style(fmt): rustfmt
2022-03-24 18:53:54 +01:00
Aram Drevekenin
509f236023
fix(tab): do not crash when only floating panes are left (#1266) 2022-03-24 17:19:09 +01:00
Thomas Linford
c4d62f8f61
fix(crash): ensure ZELLIJ_TMP_DIR exists when starting plugins (#1256) 2022-03-23 09:20:46 +01:00
Brooks Rady
9bfafde123
feat(ui): round frame corners (#1227)
* feat(ui): round frame corners

* Allow rounded_corners to be set without a palette

* Revert "Allow rounded_corners to be set without a palette"

This reverts commit 9271a4b545.

* fix(style): remove redundant code

* fix(style): clippy lints that somehow got missed

* feat(config): add ui config section
2022-03-22 14:58:16 +00:00
Aram Drevekenin
ab74b9974a
refactor(tab): move tiled panes to their own module (#1239)
* work

* tests passing

* simplify render state

* move more stuff to state

* moved tiled panes outside

* move files around

* style(fmt): rustfmt
2022-03-18 10:32:43 +01:00
a-kenji
092926c5d8
fix(wasm_vm): use cache_dirs for ephemeral plugin data (#1230)
fix(wasm_vm): use `cache_dirs` for ephemeral plugin data

Use proper `cache_directories` by default, that users can be expected
to have proper write permissions for.

The directory is used for plugin hashes, and compilation data.
2022-03-17 11:57:38 +01:00
a-kenji
b0276dfd74
fix(feat): disable_automatic_asset_installation (#1226)
* fix(feat): `disable_automatic_asset_installation`

This fixes a regression in the feature system:
The asset installation didn't get turned off by the feature.

Add error logging to the install functions.

Properly show features in setup

disable `mkdir` in `wasm_vm` on `feature-disable-asset-installation`

Alternative:
    Is this even needed? We make sure the directory is there upon the
    normal asset installation.

fixes #1130
2022-03-17 11:40:09 +01:00
Aram Drevekenin
2e03692f5b chore(version): bump development version 2022-03-16 14:25:08 +01:00
Aram Drevekenin
9c7d13984f chore(release): v0.26.1 2022-03-16 14:03:07 +01:00
Aram Drevekenin
779679f53b chore(version): bump development version 2022-03-11 16:13:01 +01:00
Thomas Linford
9961a28cb5
feature(mouse): forward mouse events (#1191)
* handle sgr mouse mode enable by applications

* forward mouse events

* fix scroll events not forwarded to floating panes

* improve mouse hold/release with floating panes
2022-03-10 13:14:02 +01:00
Thomas Linford
7e008bb039
fix(compatibility): home and end in cursor keys mode (#1190) 2022-03-09 21:21:15 +01:00
Aram Drevekenin
95e512c36d
fix(compatibility): replace wide characters under cursor properly (#1196)
* fix(compatibility): replace wide characters under cursor properly

* style(fmt): rustfmt
2022-03-09 11:04:07 +01:00
Thomas Linford
7de77536ab
refactor(tab): simplify mouse hold and release (#1185) 2022-03-08 18:26:33 +01:00
Thomas Linford
8d3bd3c9b0
fix(floating-panes): update tooltip after hiding floating panes with mouse (#1186) 2022-03-07 11:45:01 +01:00
Jae-Heon Ji
5a56aa0603
Improve: more explicit detach instruction (#1161)
* feat: update detach and remove client

* chore: apply clippy warning

* fix(tests): update snapshot
2022-03-07 19:20:13 +09:00
Thomas Linford
c5eea7bd91
refactor(tab): simplify logic for scrolling active pane (#1184) 2022-03-06 19:50:33 +01:00
Kerfuffle
e2081f2649
fix: Allow terminal title passthrough even when not drawing pane frames. (#1113)
* fix: Allow terminal title passthrough even when not drawing pane frames.

* Minor formatting fix.

* Handle case where the session name is not set.
2022-02-28 17:54:41 +01:00
Thomas Linford
efd2fa412f
fix(compatibilty): do not use current cursor style in csi erase display (#1142) 2022-02-27 21:15:03 +01:00
Orhun Parmaksız
4d64742fd0
refactor: fix unused code warnings (#1087) 2022-02-27 13:23:59 +01:00
Aram Drevekenin
3bbae77921
fix(compatibility): properly clear pane before switching to alternate screen (#1120) 2022-02-25 15:01:08 +01:00
Ken Matsui
31def4102f
fix(style0: simplify find(..).is_some() to any(..) and use += instead (#1081) 2022-02-24 11:29:56 +01:00
tfgast
cef3f1e408
fix(terminal): ensure Title doesn't overrun (#1094)
The set title escape code needs to be terminated with a bell character. See https://tldp.org/HOWTO/Xterm-Title-3.html
2022-02-24 11:22:24 +01:00
Ken Matsui
3346238a6b
fix(style): remove unnecessary borrow operators (#1084) 2022-02-24 11:08:05 +01:00
Ken Matsui
e73ce08ddf
fix(style): remove redundant .clone() calls (#1085) 2022-02-24 11:07:09 +01:00
Ken Matsui
21df45cf22
fix(style): replace sort_by with sort_by_key (#1089) 2022-02-24 11:03:03 +01:00
Ken Matsui
346e093414
fix(cleanup): simplify loop (#1077) 2022-02-24 08:08:23 +01:00
Ken Matsui
f1f5ac01af
fix(lint): simplify unnecessary return statements (#1080) 2022-02-23 20:37:01 +01:00
Ken Matsui
28c2046890
fix(lint): replace unnecessary assert_eq! with assert! (#1079) 2022-02-23 20:35:52 +01:00
Jae-Heon Ji
a489194b55
fix: invalid assignment of client_id (#1052)
* feat: sync socket connection in

* chore: apply clippy

* chore: change message name
2022-02-23 23:50:49 +09:00
Aram Drevekenin
39eddd8b1c chore(version): bump development version 2022-02-22 13:36:39 +01:00
Aram Drevekenin
256671aecc
fix(ui): restore get active at (#1076)
* don't crash if misusing the plugin pane api

* restore get active at

* rustfmt
2022-02-21 20:13:32 +01:00
Aram Drevekenin
9fa94970cc
fix(ui): floating panes UI (#1074)
* basic ui

* update plugins

* rustfmt
2022-02-21 18:01:35 +01:00
Thomas Linford
a3e69fe6da
fix(copy): rejoin wrapped lines (#1069)
When copying wrapped lines do not treat them as separate lines.
2022-02-21 17:58:54 +01:00
Aram Drevekenin
a0a0a7e5c4
feat(ux): tmux mode (#1073)
* work

* basic tmux move and functionality

* tmux mode ui

* rustfmt
2022-02-21 15:52:42 +01:00
Aram Drevekenin
821e7cbc5a
feat(ui): add floating panes (#1066)
* basic functionality

* close and reopen scratch terminal working

* embed/float and resize whole tab for floating and static floating panes

* move focus working

* fix focus change in floating panes

* move pane with mouse

* floating z indices

* tests and better resize algorithm

* starting to work on performance

* some performance experimentations

* new render engine

* reverse painters algorithm for floating panes

* fix frame buffering

* improve ux situation

* handle multiple new panes on screen without overlap

* adjust keybindings

* adjust key hints

* fix multiuser frame ui

* fix various floating/multiuser bugs

* remove stuff

* wide characters under floating panes

* fix wide character frame override

* fix non-frame boundaries interactions with floating panes

* fix selection character width

* fix title frame wide char overflow

* fix existing tests

* add tests

* refactor output out of tab

* refactor floating panes out of tab

* refactor tab

* moar refactoring

* refactorings and bring back terminal window title setting

* add frame vte output

* remove more unused stuff

* remove even more unused stuff

* you know the drill

* refactor floating panes and remove more stuffs

* refactor pane grids

* remove unused output caching

* refactor output

* remove unused stuff

* rustfmt

* some formatting

* rustfmt

* reduce clippy to normal

* remove comment

* remove unused

* fix closign pane

* fix tests
2022-02-18 21:10:06 +01:00
Thomas Linford
10a22c479f
fix(compatibility): resolve fzf crash (#1056)
* grid: add fzf test case
* revert alternate viewport creation to contain an empty row
2022-02-12 12:51:10 +01:00
Thomas Linford
18709acde9
feat(copy): allow osc52 copy destination configuration (#1022)
add copy_cliboard  option to allow configuring copy destination to primary selection instead of default clipboard
2022-02-02 15:22:34 +01:00
Thomas Linford
143bbfb0bb
fix(compatibility): do not set scroll buffer in alternate screen (#1032)
avoid moving lines to lines_above when in alternate screen.
adjust resizing when in alternate screen:
* remove extra lines instead of sending to lines_above
* truncate excess characters
2022-02-02 12:56:21 +01:00
Jae-Heon Ji
1d2e303926
feat: add focus attribute in layout (#958)
* feat(layout): add focus attribute in layout

* feat: add state of focus to tab

* chore: i love clippy

* test(layout): update focus options

* feat: add focus pane

* feat: apply focus-pane when layout is only loaded

* change the instruction name for focus-on-tab

* chore: apply cargo-fmt

* test: add e2e testcase
2022-02-01 02:19:21 +09:00
Thomas Linford
cf22e1f50e
fix(compatibility): handle csi erase param 3 (#1026) 2022-01-26 18:50:29 +01:00
Thomas Linford
a576b3150f
fix(scroll): scroll page up/down by actual amount of rows (#1025)
use pane content_rows to take account of frame enabled/disabled
2022-01-26 18:19:38 +01:00
Jae-Heon Ji
8d224cb84a
feat: accept only printable unicode char (#1016)
* feat: accept only printable unicode char

* chore: revert comments
2022-01-25 22:11:31 +09:00
Christophe Verbinnen
9cc2645db0
Add a copy command option (#996)
Usage: zellij options --copy-command "xclip -sel clip"

Co-authored-by: Christophe Verbinnen <christophev@knowbe4.com>
2022-01-15 12:38:45 +01:00
Jae-Heon Ji
65a12c0f5e
feat: change dependency for process_cwd (#1001)
* feat: change dependency for process_cwd

* test: add unittest for get_cwd

* chore: apply clippy

* test: change tty to openpty

* test(e2e): update case
2022-01-13 20:41:13 +09:00
Aram Drevekenin
f6c56f6ea3
style(comment): remove outdated 2022-01-12 09:38:04 +01:00
Aram Drevekenin
737787702e
style(format): remove debug message 2022-01-11 17:03:47 +01:00
Jae-Heon Ji
d2cfcb3bab
fix: add condition for existence of current_dir (#995) 2022-01-09 18:18:03 +09:00
Aram Drevekenin
e06300f7db chore(version): bump development version 2022-01-05 11:14:15 +01:00
Kunal Mohan
e23d06b70d
Feature: Configurable scroll buffer (#936)
* Configurable scroll buffer

* Fix unit test failures

* Add scroll_buffer_size description in the default config file

* Fix config file
2022-01-04 23:24:05 +05:30
Aram Drevekenin
0d0064afff
fix(panes): do not crash when closing fixed pane (#987) 2022-01-04 11:43:34 +01:00
Aram Drevekenin
d5fe53ef57
fix(tabs): dont panic when tab history is empty and closing tab (#990) 2022-01-04 11:07:09 +01:00
Kunal Mohan
4496c4d4dc
Pass active terminal title through to terminal emulator (#980) 2022-01-03 22:18:22 +05:30
Aram Drevekenin
153ed175af
fix(plugins): send events to plugins properly in a multiuser env (#986) 2022-01-03 16:55:21 +01:00
Aram Drevekenin
7dad61e529
refactor(tab): separate concerns (namely move pane positioning actions out of tab) (#985)
* refactor: move resizing methods to pane resizer

* refactor: move focus and close methods to pane grid

* refactor(tab): move move methods positioning to pane grid

* refactor(tab): separate pane resizer from pane grid

* style(fmt): make rustfmt happy

* style(fmt): make clippy happy
2022-01-03 15:56:41 +01:00
Jae-Heon Ji
5dd3fce4a1
fix(plugins): register correct client id (#984) 2022-01-03 15:54:41 +01:00
auronandace
00e923cfdc
Implement passing the bell signal to the terminal (#981)
* implement passing the bell signal to the terminal

* Add files via upload

add fixture to test against
2022-01-03 15:50:00 +01:00
dswij
8f5325e4ed
fix(ui): left click on tabs when pane is on fullscreen mode (#977)
* Fix left click on tabs when pane is on fullscreen mode

* run fmt
2022-01-03 14:58:15 +01:00
Jae-Heon Ji
e1997f6e7d
fix: update switch to tab bug in multiple users (#959)
* fix: update switch to tab for multiple user

* chore: remove unnecessary comments
2021-12-29 16:32:38 +01:00
danieleades
a62a23a1c7
fix(clippy): ensure clippy runs on all targets (#972)
* ensure clippy runs on all targets

* use 'AtomicBool' instead of 'Mutex<bool>'

* remove unused import

* remove 'mem::drop' no-ops

* remove loop that never loops
2021-12-29 09:16:54 +01:00
Thomas Linford
6e35f29b0f
fix(mouse): prevent unhandled mouse events escape to terminal (#976)
* workaround to not write csi mouse seqs to terminal

* tab: copy selection to clipboard only if selecting was initiated with left click

* cleanup debug log messages

* unset selecting_with_mouse when selection is empty
2021-12-28 21:39:20 +01:00
Aram Drevekenin
0d7f22f09a
fix(attach): make removing clients atomic (#966) 2021-12-23 10:44:23 +01:00
Aram Drevekenin
ec4649c7c9
fix(compatibility): handle deleting chars in lines with widechars (#965)
* fix(compatibility): handle deleting chars in lines with widechars

* style(fmt): make rustfmt happy
2021-12-22 17:57:59 +01:00
Aram Drevekenin
52977a761f
fix(compatibility): handle inserting characters after wide character (#964)
* fix(compatibility): handle inserting characters in the middle of a line after a wide character

* style(fmt): make rustfmt happy
2021-12-22 14:34:28 +01:00
Aram Drevekenin
ce8e898e6d chore(version): bump development version 2021-12-20 18:31:54 +01:00
Aram Drevekenin
6175d57702 chore(version): bump development version 2021-12-20 17:56:47 +01:00
Aram Drevekenin
ca8438b0aa
feat(collaboration): implement multiple users (#957)
* work

* feat(collaboration): implement multiple users

* style(cleanup): some leftovers
2021-12-20 17:31:07 +01:00
Aram Drevekenin
1a991ce7fb chore(version): bump development version 2021-12-14 17:32:02 +01:00
Aram Drevekenin
10da4348ae
Fix tab fullscreen switch (#941)
* fix(tab): switch focus with fullscreen

* style(fmt): make rustfmt happy
2021-12-14 09:42:52 +01:00
Aram Drevekenin
5f1f190a85 chore(version): bump development version 2021-12-13 16:19:37 +01:00
Aram Drevekenin
514d9c9b0e style(fmt): make rustfmt happy and update plugins 2021-12-13 15:14:44 +01:00
Aram Drevekenin
a721495839 hotfix(plugins): run load function for every user when cloning plugin 2021-12-13 15:07:49 +01:00
Kunal Mohan
c75bcbd937
Feature: Add pane names (#928)
* Read pane name from layout

* Update pane name at runtime

* Fix tests

* prefer and render pane name over pane title

* fix clippy errors

* fix after rebase
2021-12-09 23:30:40 +05:30
Jae-Heon Ji
d79060f69a
feat(status-bar): add multiple tips (#848)
* feat(status-bar): add draft for multiple tips

* feat: add TIPS_MAP

* Simplified 'tip' function.

* chore: update file structure

* feat(status-bar): update method of Tip rendering

* feat(status-bar): change type of tip in State

* refactor(status-bar): related to random tip selection

* feat(status-bar): add simple local cache for testing

* feat(status-bar): add cache system for tip data

* Add mpadir to wasm for plugin to access zellij temp folder.

* refactor(status-bar): update cache and utils

* fix(status-bar): update file read error

* refactor(status-bar): update macros

* chore(status-bar): delete test data

* chore(status-bar): update missing fixes

* feat(status-bar): add detailed error

* style: make clippy
2021-12-09 18:53:46 +01:00
Aram Drevekenin
92bddf1b79
fix(plugins): support multiple users (#930)
* fix(plugins): support multiple clients

* fix(style): make clippy happy
2021-12-08 18:41:41 +01:00
Marcin Puc
56e85f87d6
fix(style): various internal refactorings 2021-12-07 10:24:42 +00:00
a-kenji
b727d105f3
fix(warn): remove unnecessary mut (#922) 2021-12-03 18:09:29 +01:00
Aram Drevekenin
cbe0d5405e
fix(compatibility): do not duplicate bracketed paste in chunked stdin input (#917)
* debug message

* fix attempt

* oops

* remove log message

* rustfmt

* style(clippy): make clippy happy

* style(clippy): make clippy happy again!
2021-12-02 18:35:55 +01:00
Aram Drevekenin
464cb6beec
fix(compatibility): full screen scroll region (#915)
* fix(compatibility): properly handle scrolling when scroll region is full screen

* style(fmt): make clippy and rustfmt happy
2021-12-01 13:01:22 +01:00
Jae-Heon Ji
4e5717ec6e
fix(plugin): mismatch JSON format on get_zellij_version
* chore(wasm): comment on target of error

* fix(wasm): formatting the VERSION string

* refactor(wasm): simplify code

* chore: delete comments resolved

* feat(wasm): update write_object fn for generic
2021-11-30 20:01:03 +00:00
Aram Drevekenin
1ee743156c chore(version): bump development version 2021-11-29 10:09:22 +01:00
Jae-Heon Ji
c349586d84
feat: provide the zellij version to plugins (#894)
* feat: add draft of feature

* feat(wasm): add plugin API for getting of zellij version

* feat(wasm): update feedback

* delete unnecessary function
2021-11-26 10:44:43 +01:00
Aram Drevekenin
6c6a4393f4
This adds a UI for multiple users in panes (behind a feature flag) (#897)
* feat(ui): multiple users in panes

* style(fmt): make rustfmt happy

* style(fmt): make clippy happy
2021-11-25 16:21:59 +01:00
Thomas Linford
a96b9d8769
feat(compatibility): add support for osc 8 escape code (#822)
Resolve #645 

* add support for osc 8 escape code

* refactor, add links to CharacterStyles

* cleanup

* refactor, add minimal tests
2021-11-22 18:54:49 +01:00
Thomas Linford
707fedd1df
fix(performance): keep track of scrollback buffer size (#881)
Fix #877. Avoid calculating scrollback buffer size on each render, since the calculation becomes slower proportionally to the amount of lines buffered, and to the width of each line.
* wip: keep track of scrollback buffer size

* account for lines dropped by bounded_push

* fix: use saturating sub

* fix: account for 0 width lines

* remove log messages
2021-11-22 18:34:45 +01:00
a-kenji
198950e0b9
add(overlay): add overlay (#875)
* add overlay instructions to the `render` function

  this is a continuation of #871
2021-11-17 00:12:34 +01:00
a-kenji
b861baa6a1
First attempt to provide an overlay prompt (#871) 2021-11-15 20:13:05 +01:00
Thomas Linford
0ba8e2f7b4
Simplify terminal character style diff (#839)
* optimize EMPTY_TERMINAL_CHARACTER diff

return a diff for EMPTY_TERMINAL_CHARACTER only when necessary (when new_styles different than current), so to avoid
emitting a ansi reset code every time.

* simply character styles diffing logic
2021-11-15 08:31:53 +01:00
Thomas Linford
44852cd6b2
refactor(tab): close_pane returns closed pane (#853)
* refactor(tab): close_pane returns closed pane

Prepare for break pane command by making close_pane return the closed
pane. Also split the function up to hopefully be more readable.

* more refactoring
2021-11-13 21:51:53 +01:00
Aram Drevekenin
bd795a3e9f
refactor(tabs): lay down infrastructure for multiple users (#864)
* refactor(screen): support multiple mirrored clients

* style(fmt): make rustfmt happy

* style(clippy): make clippy happy

* whitespace

* github, y u no update CI?!

* is this a cache issue?

* is it the checkout cache?

* no cache at all?

* Debug

* fix gototab

* decoment

* gototab none in wasm_vm

* gototab none in wasm_vm

* the fun never ends

* tests(e2e): update infra and add multiple user mirroring test

* refactor(tab): change structs in tabs and terminal panes to support multiple users

* style(fmt): make rustfmt happy

* style(fmt): make clippy happy
2021-11-12 17:22:14 +01:00
Thomas Linford
8a4161ee5b
fix(compatibility): CSI cursor next line fix (#863)
Move cursor to beginning of line after moving it down.

fixes #860.
2021-11-11 21:24:59 +01:00
a-kenji
bd8c834d7c
fix(options): handling and overwriting cli opts (#859)
* fix(options): handling ond verwriting cli opts

* previously it was only possible to turn off certain features with a
  command line option, now it is possible to also overwrite this
  behavior in a sane way, for that some breaking changes happened:

  following options got renamed and inverted:
  ```
  disable_mouse_mode -> mouse_mode
  no_pane_frames -> pane_frames
  ```

  following cli options got added:
  ```
  mouse-mode [bool]
  pane-frames [bool]
  simplified-ui [bool]
  ```

  the following cli flag got removed:
  ```
  simplified-ui
  ```

  They can be specified in the following way:
  ```
  zellij options --mouse-mode true
  ```
  in order to enable the mouse mode, even if it is turned off in the
  config file:
  ```
  mouse_mode: false
  ```

  The order is now as follows:
  1. corresponding flag (`disable-mouse-mode`)
  2. corresponding option (`mouse-mode`)
  3. corresponding config option (`mouse_mode`)

* add: options and flags for the same value conflict

* example:
  ```
  zellij options --mouse-mode true --disable-mouse-mode`
  ```
  ```
  $ error: The argument '--mouse-mode <mouse-mode>' cannot be used with '--disable-mouse-mode'
  ```
2021-11-11 17:13:34 +01:00
Aram Drevekenin
26bd80be2d chore(version): bump development version 2021-11-10 18:01:56 +01:00
Aram Drevekenin
0fec10b08b chore(release): v0.20.1 2021-11-10 17:54:39 +01:00
a-kenji
abbe3b237a
add(feature): toggle boolean options with cli flag (#855)
add the ability to toggle boolean options with a cli flag:

example:
    if the pane frames are turned off in the config file,
    then passing in the `--no-pane-frames` flag will toggle the
    pane frames on
2021-11-10 13:31:37 +01:00
Ken Matsui
6d60d83e58
fix(envs): Unify operation of Zellij environment variables (#842) 2021-11-10 09:02:17 +01:00
Aram Drevekenin
b232326dc2 chore(version): bump development version 2021-11-08 15:42:46 +01:00
oromate
8f06f119fd
feat(scrolling): half-page scroll actions (#813)
* Half-page scroll actions #794

* fix(performance): do not hang when resizing large line wraps (#814)

* fix(performance): do not hang when resizing large line wraps

* style(fmt): make rustfmt happy

* style(clippy): make clippy happy

* docs(changelog): scroll fix

* fix(compatibility): home and end key fix (#815)

* fix(compatibility): handle home/end keys properly from terminfo

* style(fmt): make rustfmt happy

* style(fmt): remove unused import

* docs(changelog): home end key fix

* docs(changelog): fix link

* fix(typo): Correct typo from `occured` to `occurred` (#821)

* docs(changelog): fix a typo

* fix(docs): fix wrong arguments for `cargo make run` given in CONTRIBUTING.md (#819)

* docs(changelog): update `cargo-make` for `v0.35.3`

* fix(warning): Fix an unused import warning of std::fs on macos (#820)

* docs(changelog): fix unused import on darwin

* add: `WriteChars` action (#825)

* Behaves like the `Write` action, but one can specify
  strings themselves instead of their bytecodes.

  Usage:

  WriteChars: "cargo make test",

* docs(changelog): Add `WriteChars` action

* fix(docs): Fix a typo and some grammatical errors in bug_report.md (#826)

* docs(changelog): fix typo bug_report template

* add: `rust-version` (msrv) field to `Cargo.toml` (#828)

* specifies the minimum version the package can be compiled with,
  may be ignored with `--ignore-rust-version` option

  ref: https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field

* docs(changelog): add `rust-version` to `Cargo.toml`

* fix(unix): forkpty => openpty (#830)

* fix(unix): forkpty => openpty

* style(fmt): make rustfmt happy

* docs(changelog): forkpty => openpty

* Fix: move `colors_transform` to `colorsys` (#832)

* `colors_transform` is deprecated and superceded by `colorsys`

  ref: https://crates.io/crates/colors-transform

* docs(changelog): `colors_transform` to `colorsys`

* feat(ui): add right-click support to plugins

* chore(docs): update changelog

* chore(warnings): remove unused imports (#833)

* rename var sroll_rows and review snapshots

* style(fmt): make rustfmt happy

Co-authored-by: Aram Drevekenin <aram@poor.dev>
Co-authored-by: Ken Matsui <26405363+ken-matsui@users.noreply.github.com>
Co-authored-by: a-kenji <aks.kenji@protonmail.com>
Co-authored-by: Tw <tw19881113@gmail.com>
Co-authored-by: Brooks Rady <b.j.rady@gmail.com>
2021-11-08 15:05:47 +01:00
Henil Dedania
4ac9344085
feature(resize): Non directional resize (#520)
* feature(resize): Non directional resize

* Implement special cases

* fix resizing for panes that have `+` cross section

* fix resizing for panes that have `T` cross section

* fix panics

* Add Nondirection resize keys to plugin

* fix formatting

* fix: clippy warnings

* fix the last edge case

* implemented some of the suggested changes

* Remove helper function and elevate comment to top of function

* Use `=` to keep it consistent with Normal mode mapping as its easier to use

* Remove extra reference borrowing

* fix an edge case

* add test for nondirectional resize increase/decrease

* fix(controls): add + to resize

* refactor(resize): simplify methods

* fix(resize): properly resize opposite corner pane

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2021-11-05 09:29:45 +01:00
Aram Drevekenin
23c9751346
fix(resize): do not ignore minimums when doing directional resizes (#838)
* fix(resize): do not ignore minimums when doing directional resizes

* style(fmt): make rustfmt happy
2021-11-04 23:19:38 +01:00
Aram Drevekenin
daa70022c9
fix(cwd): open pane in cwd even if default shell is explicit (#834)
* fix(cwd): open pane in cwd even if default shell is explicit

* style(fmt): make rustfmt happy
2021-11-03 17:59:28 +01:00
a-kenji
a83a8b9a96
chore(warnings): remove unused imports (#833) 2021-11-03 14:31:06 +01:00
Tw
9ea3dc0dbe
feat(ui): add right-click support to plugins 2021-11-02 18:49:10 +00:00
Aram Drevekenin
a14a2f6fb0
fix(unix): forkpty => openpty (#830)
* fix(unix): forkpty => openpty

* style(fmt): make rustfmt happy
2021-11-01 22:01:59 +01:00
a-kenji
d2b81293df
add: WriteChars action (#825)
* Behaves like the `Write` action, but one can specify
  strings themselves instead of their bytecodes.

  Usage:

  WriteChars: "cargo make test",
2021-11-01 08:52:55 +01:00
Ken Matsui
f04a7a4ee7
fix(warning): Fix an unused import warning of std::fs on macos (#820) 2021-10-31 20:45:52 +01:00
Aram Drevekenin
42b66644ae
fix(performance): do not hang when resizing large line wraps (#814)
* fix(performance): do not hang when resizing large line wraps

* style(fmt): make rustfmt happy

* style(clippy): make clippy happy
2021-10-29 12:22:30 +02:00
Brooks Rady
6bb1ec6636
fix(perf): plugins are only compiled once 2021-10-26 18:43:17 +01:00