Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some real/saved cursor bugs during resize #3032

Merged
merged 19 commits into from
Jan 22, 2024

Commits on Dec 30, 2023

  1. refactor: Simplify transfer_rows_from_viewport_to_lines_above

    next_lines is always consolidated to a single Row, which immediately
    gets removed - we can remove some dead code as a result
    aidanhs committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    2ed84e3 View commit details
    Browse the repository at this point in the history
  2. perf: Batch remove rows from the viewport for performance

    Given a 1MB line catted into the terminal, a toggle-fullscreen +
    toggle-fullscreen + close-pane + `run true` goes from ~9s to ~3s
    aidanhs committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    c1d8b5d View commit details
    Browse the repository at this point in the history
  3. perf: Optimize Row::drain_until by splitting chars in one step

    Given a 10MB line catted into the terminal, a toggle-fullscreen +
    toggle-fullscreen + close-pane + `run true` goes from ~23s to ~20s
    aidanhs committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    78fafb1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cca9656 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8ce6ce1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    110bf46 View commit details
    Browse the repository at this point in the history
  7. fix: Use same saved cursor logic in height resize as width

    See zellij-org#2182 for original introduction that only added it in one branch,
    this fixes an issue where the saved cursor was incorrectly reset when
    the real cursor was
    aidanhs committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    75143e6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    37d0dab View commit details
    Browse the repository at this point in the history
  9. fix: Don't create canonical lines if cursor ends on EOL after resize

    Previously if a 20 character line were split into two 10 character
    lines, the cursor would be placed on the line after the two lines.
    New characters would then be treated as a new canonical line. This
    commit fixes this by biasing cursors to the end of the previous line.
    aidanhs committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    918b642 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e2c9d6f View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    fba2574 View commit details
    Browse the repository at this point in the history
  12. chore: Apply cargo format

    aidanhs committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    528ccbf View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2024

  1. Configuration menu
    Copy the full SHA
    11b59da View commit details
    Browse the repository at this point in the history
  2. Bump rust version to 1.75.0 (zellij-org#3039)

    * rust-toolchain: Bump toolchain version to 1.69.0
    
    which, compared to the previous 1.67.0, has the following impacts on
    `zellij`:
    
    - [Turn off debuginfo for build deps][2]: Increases build time (on my
      machine) from ~230 s in 1.67.0 to ~250 s now, *which is unexpected*
    
    This version also changes [handling of the `default-features` flag][3]
    when specifying dependencies in `Cargo.toml`. If a dependent crate
    requires `default-features = true` on a crate that is required as
    `default-features = false` further up the dependency tree, the `true`
    setting "wins". We only specify `default-features = false` for three
    crates total:
    
    - `names`: This is used only by us
    - `surf`: This is used only by us
    - `vte`: This is also required by `strip-ansi-escapes`, but that has
      `default-features = false` as well
    
    How this affects our transitive dependencies is unknown at this point.
    
    [2]: rust-lang/cargo#11252
    [3]: rust-lang/cargo#11409
    
    * rust-toolchain: Bump toolchain version to 1.70.0
    
    which, compared to the previous 1.69.0, as the following impacts on
    `zellij`:
    
    1. [Enable sparse registry checkout for crates.io by default][1]
    
    This drastically increases the time to first build on a fresh rust
    installation/a rust installation with a clean cargo registry cache.
    Previously it took about 75s to populate the deps/cache (with `cargo
    fetch --locked` and ~100 MBit/s network), whereas now the same process
    takes ~10 s.
    
    2. [The `OnceCell` type is now part of std][2]
    
    In theory, this would allow us to cut a dependency from `zellij-utils`,
    but the `once_cell` crate is pulled in by another 16 deps, so there's no
    point in attempting it right now.
    
    Build times and binary sizes are unaffected by this change compared to
    the previous 1.69.0 toolchain.
    
    [1]: rust-lang/cargo#11791
    [2]: https://doc.rust-lang.org/stable/std/cell/struct.OnceCell.html
    
    * rust-toolchain: Bump toolchain version to 1.75.0
    
    which, compared to the previous 1.70.0, has the following impacts on
    `zellij`:
    
    1. [cross-crate inlining][8]
    
    This should increase application performance, as functions can now be
    inlined across crates.
    
    2. [`async fn` in traits][9]
    
    This would allow us to drop the `async_trait` dependency, but it is
    currently still required by 3 other dependencies.
    
    Build time in debug mode (on my own PC) is cut down from 256s to 189s
    (for a clean build). Build time in release mode is cut down from 473s to
    391s (for a clean build). Binary sizes only change minimally (825 MB ->
    807 MB in debug, 29 MB -> 30 MB in release).
    
    [8]: rust-lang/rust#116505
    [9]: rust-lang/rust#115822
    
    * chore: Apply rustfmt.
    
    * CHANGELOG: Add PR zellij-org#3039.
    har7an authored and imsnif committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    956b50d View commit details
    Browse the repository at this point in the history
  3. feat(plugins): introduce 'pipes', allowing users to pipe data to and …

    …control plugins from the command line (zellij-org#3066)
    
    * prototype - working with message from the cli
    
    * prototype - pipe from the CLI to plugins
    
    * prototype - pipe from the CLI to plugins and back again
    
    * prototype - working with better cli interface
    
    * prototype - working after removing unused stuff
    
    * prototype - working with launching plugin if it is not launched, also fixed event ordering
    
    * refactor: change message to cli-message
    
    * prototype - allow plugins to send messages to each other
    
    * fix: allow cli messages to send plugin parameters (and implement backpressure)
    
    * fix: use input_pipe_id to identify cli pipes instead of their message name
    
    * fix: come cleanups and add skip_cache parameter
    
    * fix: pipe/client-server communication robustness
    
    * fix: leaking messages between plugins while loading
    
    * feat: allow plugins to specify how a new plugin instance is launched when sending messages
    
    * fix: add permissions
    
    * refactor: adjust cli api
    
    * fix: improve cli plugin loading error messages
    
    * docs: cli pipe
    
    * fix: take plugin configuration into account when messaging between plugins
    
    * refactor: pipe message protobuf interface
    
    * refactor: update(event) -> pipe
    
    * refactor - rename CliMessage to CliPipe
    
    * fix: add is_private to pipes and change some naming
    
    * refactor - cli client
    
    * refactor: various cleanups
    
    * style(fmt): rustfmt
    
    * fix(pipes): backpressure across multiple plugins
    
    * style: some cleanups
    
    * style(fmt): rustfmt
    
    * style: fix merge conflict mistake
    
    * style(wording): clarify pipe permission
    imsnif committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    5660f72 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3847732 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6a68400 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2024

  1. fix e2e tests

    imsnif committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    3870ac8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ca23236 View commit details
    Browse the repository at this point in the history