mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-25 14:05:41 -05:00
Fix mouse modes not being mutually exclusive
This commit is contained in:
parent
cce3af3d91
commit
d707e064a9
2 changed files with 14 additions and 2 deletions
|
@ -79,6 +79,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Underline/strikeout drawn above visual bell
|
||||
- Terminal going transparent during visual bell
|
||||
- Selection not being cleared when sending chars through a binding
|
||||
- Mouse protocols/encodings not being mutually exclusive within themselves
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
@ -1878,22 +1878,33 @@ impl<T: EventListener> ansi::Handler for Term<T> {
|
|||
},
|
||||
ansi::Mode::ShowCursor => self.mode.insert(TermMode::SHOW_CURSOR),
|
||||
ansi::Mode::CursorKeys => self.mode.insert(TermMode::APP_CURSOR),
|
||||
// Mouse protocols are mutually exlusive
|
||||
ansi::Mode::ReportMouseClicks => {
|
||||
self.mode.remove(TermMode::MOUSE_MODE);
|
||||
self.mode.insert(TermMode::MOUSE_REPORT_CLICK);
|
||||
self.event_proxy.send_event(Event::MouseCursorDirty);
|
||||
},
|
||||
ansi::Mode::ReportCellMouseMotion => {
|
||||
self.mode.remove(TermMode::MOUSE_MODE);
|
||||
self.mode.insert(TermMode::MOUSE_DRAG);
|
||||
self.event_proxy.send_event(Event::MouseCursorDirty);
|
||||
},
|
||||
ansi::Mode::ReportAllMouseMotion => {
|
||||
self.mode.remove(TermMode::MOUSE_MODE);
|
||||
self.mode.insert(TermMode::MOUSE_MOTION);
|
||||
self.event_proxy.send_event(Event::MouseCursorDirty);
|
||||
},
|
||||
ansi::Mode::ReportFocusInOut => self.mode.insert(TermMode::FOCUS_IN_OUT),
|
||||
ansi::Mode::BracketedPaste => self.mode.insert(TermMode::BRACKETED_PASTE),
|
||||
ansi::Mode::SgrMouse => self.mode.insert(TermMode::SGR_MOUSE),
|
||||
ansi::Mode::Utf8Mouse => self.mode.insert(TermMode::UTF8_MOUSE),
|
||||
// Mouse encodings are mutually exlusive
|
||||
ansi::Mode::SgrMouse => {
|
||||
self.mode.remove(TermMode::UTF8_MOUSE);
|
||||
self.mode.insert(TermMode::SGR_MOUSE);
|
||||
},
|
||||
ansi::Mode::Utf8Mouse => {
|
||||
self.mode.remove(TermMode::SGR_MOUSE);
|
||||
self.mode.insert(TermMode::UTF8_MOUSE);
|
||||
},
|
||||
ansi::Mode::AlternateScroll => self.mode.insert(TermMode::ALTERNATE_SCROLL),
|
||||
ansi::Mode::LineWrap => self.mode.insert(TermMode::LINE_WRAP),
|
||||
ansi::Mode::LineFeedNewLine => self.mode.insert(TermMode::LINE_FEED_NEW_LINE),
|
||||
|
|
Loading…
Reference in a new issue