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

Line-based/rect-block selection by mouse #149

Closed
o-sdn-o opened this issue Jan 10, 2022 · 23 comments · Fixed by #194
Closed

Line-based/rect-block selection by mouse #149

o-sdn-o opened this issue Jan 10, 2022 · 23 comments · Fixed by #194
Assignees
Labels
enhancement New feature or request Terminal Built-in terminal emulator

Comments

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Jan 10, 2022

Selecting text in terminal

  • Select text using LeftDrag
  • Double LeftClick to select a word
    • Select emails by clicking on @ character
    • Select numbers, hexadecimals, IP-addresses or any kind of numerical stuff by clicking on digits
    • Select whitespace by clicking on whitespace character
    • Select a word by clicking on any letter
  • Triple LeftClick to select the entire paragraph
  • Switching between block (rectangular) and linear selection using the Alt key
  • Modify selection by holding the Ctrl key
  • Dismiss selection using LeftClick
  • Copy selection using RightClick (+Ctrl to keep selection visible after copy)
  • Paste copied data using RightClick
  • Render clipboard content around mouse cursor
  • Clear local clipboard buffer using Left+RightClick anywhere
  • Modify selection by dragging markers
  • Change the style of the selected lines with the UI toggles =─ ─=─ ─= Wrap
  • Selection format toggle button (three states; takes precedence over mouse tracking mode):
    • No selection available
      # Selection #
    • Select text only (plain text, default)
      + Plaintext +
    • Select text with all attributes (ANSI-escaping: colors, alignment, etc)
      ! ANSI-text !
  • Status info bottom left
    • Block selection: h_size : v_size
    • Linear selection: n rows ~m cells
  • Scrolling region DECSTBM aware
@o-sdn-o o-sdn-o added the enhancement New feature or request label Jan 10, 2022
@o-sdn-o o-sdn-o self-assigned this Jan 10, 2022
@o-sdn-o o-sdn-o added the Terminal Built-in terminal emulator label Feb 3, 2022
@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Feb 15, 2022

Mouse selection for alternate buffer:

Windows.Terminal.Dev.2022-02-16.02-41-57.mp4

@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Feb 22, 2022

Selecting text like a word processor (scrollback buffer)

Windows.Terminal.Dev.2022-02-22.19-18-57.1.mp4

@USLTD
Copy link
Contributor

USLTD commented Feb 24, 2022

I have a few questions.

  1. Why is your project not so well-known? I mean this project is greater than many other alternatives and even those alternatives are well-known.
  2. How did you learn things like this
  3. Are you really human and not some kind of Terminal god/deity or whatever?!

@o-sdn-o

This comment was marked as off-topic.

@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Apr 21, 2022

Oooh, thanks for discussing this feature design.
This design is due to the fact that you must always see the contents of the clipboard, since it can be modified by external sources.

Inspired by https://gitlab.gnome.org/GNOME/vte/-/issues/2495

If at some point it needs to be removed, then it can be instantly reset with a left+right click.

Also the preview is limited to a field of 80x25.

@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Apr 21, 2022

I have never used such a feature. I need to see how practical (and safe) it is. In the future, this can be configured in the settings. It's just not yet clear which settings are needed.

@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Apr 21, 2022

I will now publish release 0.7.0 in which this feature will be hardcoded, and in subsequent releases I will make corrections based on the experience gained.

@o-sdn-o o-sdn-o mentioned this issue Apr 21, 2022
o-sdn-o added a commit that referenced this issue Apr 21, 2022
Text Selection (terminal) #149
Set default terminal colors using VT-sequence #191
Change selection mode using VT-sequence #149
Forward clipboard data (nested OSC 52) #186
@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Apr 21, 2022

Feel free to continue the discussion here.

@USLTD
Copy link
Contributor

USLTD commented Apr 22, 2022

I will test it later and will make feedback about it's practicality

@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Apr 22, 2022

I also updated the release to 0.7.1, in which I removed the side indents (three cells on the left and right). Initially, I thought it was convenient, but now I realized that it is not.

@USLTD
Copy link
Contributor

USLTD commented Apr 22, 2022

I have a question. How to build DEMO version?

@USLTD
Copy link
Contributor

USLTD commented Apr 22, 2022

I use Termux currently so I can't use releases version due architecture difference (aarch64 is mine, while releases are amd64)

@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Apr 22, 2022

I have a question. How to build DEMO version?

You should uncomment //#define DEMO in vtm.cpp

or set DEMO=ON

git clone https://github.com/netxs-group/vtm.git && cd ./vtm
cmake ./src -DCMAKE_BUILD_TYPE=Release -DDEMO=ON
cmake --build .
cmake --install .

@USLTD
Copy link
Contributor

USLTD commented Apr 22, 2022

Are there any flags needed during cmake build?

@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Apr 22, 2022

Are there any flags needed during cmake build?

In some cases it is necessary to set the CMAKE_BUILD_TYPE=Release

@USLTD
Copy link
Contributor

USLTD commented Apr 22, 2022

Alright I will try

@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Apr 22, 2022

I decided to completely abandon the grips. They don't make sense. The user can hold down the Ctrl key to modify the selection and there is no need to hit the grip exactly. I am working on it now.

@o-sdn-o
Copy link
Collaborator Author

o-sdn-o commented Apr 22, 2022

Get rid of grips (by holding Ctrl key)

Terminal.Dev.2022-04-23.04-15-49.mp4

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

Successfully merging a pull request may close this issue.

2 participants