diff options
author | Aram Drevekenin <aram@poor.dev> | 2022-07-08 17:19:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 17:19:42 +0200 |
commit | c89b416d764d80a72130821506f36157a08321e9 (patch) | |
tree | 6d1cc2d7fd5fddbb33fcbff192153700a9788bec /zellij-server/src/route.rs | |
parent | 61deca80edb1632eb8ca22f627c6001b757021dc (diff) |
feat(terminal): sixel support (#1557)
* work
* work
* work
* work
* work
* more work
* work
* work
* work
* hack around stdin repeater
* refactor(sixel): rename sixel structs
* feat(sixel): render text above images
* fix(sixel): reap images once they're past the end of the scrollbuffer
* fix(sixel): display images in the middle of the line
* fix(sixel): render crash
* fix(sixel): react to SIGWINCH
* fix(sixel): behave properly in alternate screen mode
* fix(sixel): reap images on terminal reset
* feat(sixel): handle DECSDM
* fix(terminal): properly respond to XTSMGRAPHICS and device attributes with Sixel
* Add comment
* fix(sixel): hack for unknown event overflow until we fix the api
* feat(input): query terminal for all OSC 4 colors and respond to them in a buggy way
* fix(sixel): do not render corrupted image
* feat(input): improve STDIN queries
* fix(client): mistake in clear terminal attributes string
* fix(ansi): report correct number of supported color registers
* fix(sixel): reap images that are completely covered
* style(comment): fix name
* test(sixel): infra
* test(sixel): cases and fixes
* fix(sixel): forward dcs bytes to sixel parser
* refactor(client): ansi stdin parser
* refactor(output): cleanup
* some refactorings
* fix test
* refactor(grid): sixel-grid / sixel-image-store
* refactor(grid): grid debug method
* refactor(grid): move various logic to sixel.rs
* refactor(grid): remove unused methods
* fix(sixel): work with multiple users
* refactor(pane): remove unused z_index
* style(fmt): prepend unused variable
* style(fmt): rustfmt
* fix(tests): various apis
* chore(dependencies): use published version of sixel crates
* style(fmt): rustfmt
* style(fmt): rustfmt
* style(lint): make clippy happy
* style(lint): make clippy happy... again
* style(lint): make clippy happy... again (chapter 2)
* style(comment): remove unused
* fix(colors): export COLORTERM and respond to XTVERSION
* fix(test): color register count
* fix(stdin): adjust STDIN sleep times
Diffstat (limited to 'zellij-server/src/route.rs')
-rw-r--r-- | zellij-server/src/route.rs | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/zellij-server/src/route.rs b/zellij-server/src/route.rs index 253f62bcb..4420cf36f 100644 --- a/zellij-server/src/route.rs +++ b/zellij-server/src/route.rs @@ -28,14 +28,24 @@ fn route_action( client_id: ClientId, ) -> bool { let mut should_break = false; - session - .senders - .send_to_plugin(PluginInstruction::Update( - None, - Some(client_id), - Event::InputReceived, - )) - .unwrap(); + + // forward the action to plugins unless it is a mousehold + // this is a bit of a hack around the unfortunate architecture we use with plugins + // this will change as soon as we refactor + match action { + Action::MouseHold(_) => {}, + _ => { + session + .senders + .send_to_plugin(PluginInstruction::Update( + None, + Some(client_id), + Event::InputReceived, + )) + .unwrap(); + }, + } + match action { Action::ToggleTab => { session @@ -493,6 +503,16 @@ pub(crate) fn route_thread_main( )) .unwrap(); }, + ClientToServerMsg::ColorRegisters(color_registers) => { + rlocked_sessions + .as_ref() + .unwrap() + .senders + .send_to_screen(ScreenInstruction::TerminalColorRegisters( + color_registers, + )) + .unwrap(); + }, ClientToServerMsg::NewClient( client_attributes, cli_args, |