The original check of whether a cursor movement was intentional or just
in the same window wasn't enough for the command line, where a cursor
didn't really move but was just displayed in the command line area for a
short time. Hardcodes 4 as constant for the commandline mode, I have no
idea how future-safe that is.
macos-click-through
MultisampledNight 2 years ago
parent c7531fd0cb
commit ff10bb0be9
No known key found for this signature in database
GPG Key ID: C81EF9B053977241

@ -22,6 +22,8 @@ pub use grid::CharacterGrid;
pub use style::{Colors, Style};
pub use window::*;
const MODE_CMDLINE: u64 = 4;
#[derive(Clone, Debug)]
pub struct AnchorInfo {
pub anchor_grid_id: u64,
@ -383,8 +385,14 @@ impl Editor {
let intentional = grid_left == 1;
// If the cursor was already in this message, we can still move within it.
let already_there = self.cursor.parent_window_id == grid;
if !intentional && !already_there {
// This ^ check alone is a bit buggy though, since it fails when the cursor is
// technically still in the edit window but "temporarily" at the cmdline. (#1207)
let using_cmdline = self
.current_mode_index
.map(|current| current == MODE_CMDLINE)
.unwrap_or(false);
if !intentional && !already_there && !using_cmdline {
trace!(
"Cursor unexpectedly sent to message buffer {} ({}, {})",
grid,

Loading…
Cancel
Save