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

Cannot option+click to select text in less --mouse <file> #4297

Open
Tyriar opened this issue Dec 8, 2022 · 3 comments
Open

Cannot option+click to select text in less --mouse <file> #4297

Tyriar opened this issue Dec 8, 2022 · 3 comments
Labels

Comments

@Tyriar
Copy link
Member

Tyriar commented Dec 8, 2022

VS Code issue: microsoft/vscode#165004

@Tyriar Tyriar added the type/bug Something is misbehaving label Dec 8, 2022
@Tyriar Tyriar added this to the 5.1.0 milestone Dec 8, 2022
@Tyriar Tyriar self-assigned this Dec 8, 2022
@Tyriar Tyriar changed the title altClickMovesCursor overrides macOptionIsMeta when mouse events are on Cannot option+click to select text in less --mouse <file> Dec 8, 2022
@Tyriar
Copy link
Member Author

Tyriar commented Dec 8, 2022

I'm not sure what the right fix is here actually.

@jerch
Copy link
Member

jerch commented Dec 9, 2022

@Tyriar

Imho there are multiple things unclear here:

  • Who does the highlighting here? Is this normal TE mouse semantics, or done by less (thus by mouse reports --> less updates cell contents in inverse)? To find that out, someone would have to grab the pty data either from iTerm (if thats possible) or do the option + click thing with a mouse reporting script in iTerm (bin/test_mousemodes.js can be used for that after finding out the mouse mode less --mouse uses). To me it certainly looks like option+ skips mouse reports in iTerm2 here.
  • The cross pointer in xterm.js demo case indicates, that the rectangular selection is bound to that key. To mimick iTerms behavior, this would have to be configurable (imho its currently hardcoded that way in xterm.js). I am not sure, if this should be changed easily, the rectangular selection idea is there for years now, and ppl might simply complain the other way around, if it got changed to something else. So basically I see here a conflict of user interface metaphors and what users are expecting to work. And for sure we cannot cover all of those, as a std keyboard only has ~3 combining keys.

Btw regarding normal mouse semantics while mouse reports are active for app side, @christianparpart has brought up the idea of a passive mouse reporting mode, where the normal mouse semantics can stay active: https://github.com/contour-terminal/vt-extensions/blob/master/passive-mouse-tracking.md
Imho thats the real solution for the underlying problem here (being able to highlight text, while less has mouse reports running), maybe we should adopt that?

@Tyriar
Copy link
Member Author

Tyriar commented Dec 11, 2022

@jerch when I did the same in iterm I was able to get less to select the range with option+click, I don't think I was able to do that with xterm.js regardless of settings. I might have been doing something wrong though as I went through an awful lot of issues the past week.

RE rectangle selection, this feels secondary to me and should be disabled if macOptionIsMeta is set.

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

No branches or pull requests

2 participants