Make alt+click behavior configurable#3181
Make alt+click behavior configurable#3181Tyriar merged 5 commits intoxtermjs:masterfrom awmottaz:master
Conversation
|
Just a note: I am working on adding a couple of tests:
But I thought I would push up the PR with the implementation right away to get feedback on that. |
|
I am struggling with writing tests for this. It appears that interaction with the DOM is explicitly disabled in the |
|
Just wondering if we want to make this a breaking change. Before, the alt-click behavior was enabled by default. With this change it's disabled by default and must be enabled. It may be that we should disable it; I don't know, but I thought I'd ask. |
I meant for this not to be a breaking change. I set the default value to |
mofux
left a comment
There was a problem hiding this comment.
Thanks for the contribution! Looks good so far, IMO no additional tests for this feature are required. There are still some missing bits though:
Please add the new option here:
xterm.js/src/browser/public/Terminal.ts
Line 173 in 84fa6be
and here:
xterm.js/src/browser/public/Terminal.ts
Line 185 in 84fa6be
and here:
xterm.js/src/common/services/Services.ts
Line 186 in 84fa6be
| false | ||
| ); | ||
| if (coordinates && coordinates[0] !== undefined && coordinates[1] !== undefined) { | ||
| if (this._optionsService.getOption('altClickMovesCursor') && coordinates && coordinates[0] !== undefined && coordinates[1] !== undefined) { |
There was a problem hiding this comment.
I think the check for this option should be moved up to the parent if statement:
|
Thanks @mofux, I made all of your requested changes |
|
@awmottaz I see, my mistake! |
|
Thanks @awmottaz 🙂 |
Adds a new Boolean option
altClickMovesCursorwhich enables/disables the alt+click behavior that moves the prompt cursor to the location of the mouse.Closes #3145