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

Disable Quick Edit Mode with mouse support #965

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Disable Quick Edit Mode with mouse support
- On windows disable quick edit mode if mouse support
  is requested which allows mouse events to
  get propagated automatically.
- There's no explicit revert for this as it seems
  to get done automatically.
- Without this user would need to know that quick edit
  needs to be disabled which is awkward in conhost
  and even more difficult with new windows terminal
  which doesn't even directly expose these settings
  in the UI.
- Fixes #964
  • Loading branch information
jvalkeal committed Apr 17, 2024
commit 15900ebe3f5bc3056e6227a64043f2dcaf041162
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public abstract class AbstractWindowsTerminal<Console> extends AbstractTerminal
protected static final int ENABLE_MOUSE_INPUT = 0x0010;
protected static final int ENABLE_INSERT_MODE = 0x0020;
protected static final int ENABLE_QUICK_EDIT_MODE = 0x0040;
protected static final int ENABLE_EXTENDED_FLAGS = 0x0080;

protected final Writer slaveInputPipe;
protected final NonBlockingInputStream input;
Expand Down Expand Up @@ -201,6 +202,9 @@ protected void updateConsoleMode() {
}
if (tracking != MouseTracking.Off) {
mode |= ENABLE_MOUSE_INPUT;
// mouse events not send with quick edit mode
// to disable ENABLE_QUICK_EDIT_MODE just set extended flag
mode |= ENABLE_EXTENDED_FLAGS;
}
setConsoleMode(inConsole, mode);
}
Expand Down