Commit Graph

180 Commits

Author SHA1 Message Date
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
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
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
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
Aram Drevekenin
685b51efbb
fix(compatibility): improve handling of wide characters inserted in the middle of existing lines (#806)
* fix(compatibility): handle wide characters inserted in line middle

* fix(compatibility): more wide char handling

* style(fmt): make rustfmt happy

* style(fmt): make clippy happy

* style(fmt): make clippyt happy

* style(fmt): make rustfmt happy... again
2021-10-26 16:43:56 +02:00
Kunal Mohan
164eb6a5b7
Feature: Rotate Pane locations (#802)
fix #165
2021-10-26 09:54:05 +05:30
Alexandre Courbot
21380c278e
fix(performance): immediately render after a period of inactivity (#798)
The current code waits for 30ms after reading new data to refresh the
screen in order to batch input together. This reduces the number of
refreshes, but also adds perceptible latency as keystrokes will only get
visual feedback after a 30 ms delay.

Improve this by immediately refreshing if more than 30ms have already
passed since the last refresh. That way punctual events like keystrokes
get immediate feedback, while heavier input still gets batched together.
2021-10-25 16:51:30 +02:00
Brooks J Rady
e0d7212c2a chore(rust): move to 2021 edition
Get with the times, kiddo (and all hail disjoint captures)
2021-10-22 02:21:16 +01:00
Aram Drevekenin
a99354a155
refactor(screen): more multiple-users groundwork (#788)
* 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

* style(fmt): make rustfmt happy
2021-10-20 10:37:38 +02:00
Kunal Mohan
d90e3d4cac
Feature: Move panes directionally (#762)
* Feature: Move panes directionally

* change keybinds

* Fix active pane after move

* Add a separate 'Move' mode

* Add tests

* Add more tests

* Send resize message to pty

* wrap set_terminal_size_using_fd() in macro

* change keybind for Move mode

* cargo fmt

* fix test

* move render functions from tab.rs to screen.rs

* undo wrong keybinds
2021-10-19 20:20:28 +05:30
Thomas Linford
76a96b538b
logging: remove unused log functions, change log file const to new file (#779) 2021-10-18 10:52:58 +02:00
Brooks J Rady
b94b25c5fe fix(plugin): clean up the mouse PR a little 2021-10-12 23:11:23 +01:00
qepasa
0710594588
feat(plugin): Add mouse events for plugins (#629)
* feat(plugin): Add mouse events for plugins

* Add double click support in strider

* Add support for mouse clicks in tab-bar and fix bug in strider with selecting past the list of files and random double click action

* continue working on mouse support for tab bar

* finish tab change

* fix fmt and fix bug in strider double-click

* fix clippy

* cleanup dbgs and logs

* fix clippy

* noop change to rerun e2e tests

* Rebase and fix mouse click behavior in tab-bar and strider after rebase

* fix fmt

* remove dbgs and and comment in tab-line/main.rs

* cargo fmt

* Code review suggestions

* rebase fix

* fix clippy

* fix mouse selection for tabs in tab-bar
2021-10-12 22:37:54 +01:00
Thomas Linford
45af3e4279
Preserve current umask (#777)
* preserve umask when starting server

* make sure log files are created with explicit permissions
2021-10-12 18:11:16 +05:30
Jae-Heon Ji
0ca5c18729
feat(cli): add kill-session command (#745)
* feat: add kill-session command

* style: apply formatting rules

* feat: add new instruction for kill-session

* feat: update feedback of kill-session

* separation of command `kill-session` and `kill-all-sessions` function.
* Add information to various situations
* Add a question (yes or no) when executing the `kill-all-sessions`
  command.

* chore: adjust clippy warning

* fix warning wording

* make rustfmt happy

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2021-10-11 16:57:56 +02:00
Aram Drevekenin
f2401d0b25
refactor(clients): support multiple clients in tab/screen rendering infra (#770) 2021-10-07 15:22:20 +02:00
Thomas Linford
04fb9de8fa
make sure tabs are updated when closing panes (#757)
* call update_tabs on closing panes

* screen: avoid explit render after update_tabs

update_tabs causes a render anyway, by updating plugins, and after that
a render is requested.
2021-10-07 13:41:06 +02:00
Kunal Mohan
3c05f26802
Fix(scroll): Prevent scroll buffer overwrite (#655)
* fix #306: Buffer new vte events when pane is scrolled up

* Exit scroll mode after pressing [Enter] once

* clear scroll of active pane when changing from scroll mode to normal or locked mode

* Increase render interval
2021-10-01 22:20:13 +05:30
Aram Drevekenin
fb8e44b8a8
fix(compatibility): scroll lines into scrollback when clearing screen (#747)
* fix(compatibility): scroll lines into scrollback when clearing screen

* fix(tests): silently fail on channel close error
2021-09-28 16:44:26 +02:00
Aram Drevekenin
8b3287c452
fix(compatibility): handle cursor movements outside scroll region (#746)
* fix(compatibility): handle cursor movements outside scroll region

* style(fmt): make clippy happy
2021-09-28 15:41:32 +02:00