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

Copy mode 1.0 #66

Closed
daonb opened this issue Nov 1, 2020 · 1 comment
Closed

Copy mode 1.0 #66

daonb opened this issue Nov 1, 2020 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@daonb
Copy link
Contributor

daonb commented Nov 1, 2020

When the user scrolls up, search or select text the pane enters copy-mode. Upon entering two things should happen:

  • a new indicator is displayed to the left of the network indicator
  • the search bar is displayed

The search bar arrow buttons should work, the input have a yellow border and an "X" button should be added to exit copy-mode.

Scrolling all the way down should not exit copy mode.

Splitting shouldn't work, but the following keys should:

  • q to quit copy mode
  • space to begin selection
  • escape to clear selection
  • enter to copy selection to the clipboard and quit
  • jhkl - for movments
@daonb daonb added the enhancement New feature or request label Nov 1, 2020
@daonb daonb added this to the First Private Beta milestone Nov 1, 2020
@daonb daonb self-assigned this Nov 10, 2020
@akariv
Copy link
Contributor

akariv commented Mar 31, 2021

I've implemented an initial version of Copy mode in #147
It depends on a change I've made in xtermjs - xtermjs/xterm.js#3274, which allows styling a part of the terminal without having to select or change its contents.

While we could use the above code with a fork of xtermjs, it's preferable to use the main branch of xtermjs and to incorporate whatever changes we need there (and not use a fork, which is not maintained in the long run).

For that, I've prepared a new pull request, implementing a 'Decorations API', which provides a new capability to 'decorate' the terminal with styles, widgets and stuff - obviously much more than what we need but that was what xtermjs developers had in mind.

I did some initial work there - xtermjs/xterm.js#3302 - which wasn't finished. There are some code review comments there, as well as some conflicting design requirements 😄 . Once that API is done and merged, we could re-implement the copy mode pull request to use it instead of our own patch.

@daonb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants