Repository navigation
Introduce Mark Mode #13053
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
Introduce Mark Mode #13053
Changes from all commits
2f4a1c5
262a6bb
c9e28cb
2d71c2c
75faa5d
f302605
4a19d6b
9564090
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -318,6 +318,7 @@ | |
| "moveFocus", | ||
| "movePane", | ||
| "swapPane", | ||
| "markMode", | ||
| "moveTab", | ||
| "multipleActions", | ||
| "newTab", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1123,7 +1123,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation | |
| { | ||
| // Manually show the cursor when a key is pressed. Restarting | ||
| // the timer prevents flickering. | ||
| _core.CursorOn(true); | ||
| _core.CursorOn(!_core.IsInMarkMode()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this right? So we don't want the cursor to be shown at all when in mark mode?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that's intentional (but definitely up for discussion on the design, actually). I'll just rapid fire random thoughts in my head for why I feel this is the desired behavior...
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah right I forgot about the overlays. Good point. |
||
| _cursorTimer->Start(); | ||
| } | ||
|
|
||
|
|
@@ -1594,7 +1594,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation | |
| if (_cursorTimer) | ||
| { | ||
| // When the terminal focuses, show the cursor immediately | ||
| _core.CursorOn(true); | ||
| _core.CursorOn(!_core.IsInMarkMode()); | ||
| _cursorTimer->Start(); | ||
| } | ||
|
|
||
|
|
@@ -1845,6 +1845,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation | |
| _core.SelectAll(); | ||
| } | ||
|
|
||
| void TermControl::ToggleMarkMode() | ||
| { | ||
| _core.ToggleMarkMode(); | ||
| } | ||
|
|
||
| void TermControl::Close() | ||
| { | ||
| if (!_IsClosing()) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised we don't have a helper for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think at one point I made (or witnessed) the decision that triggering the renderer and (un)locking would be handled at the control core layer consistently to ensure we don't deadlock on accident. It's a little annoying, but we could swing the pendulum the other way hahaha