fn mouse_state(&mut self, mods: ModifiersState) -> MouseState {
        // Check message bar before URL to ignore URLs in the message bar
        if self.message_close_at_cursor() {
            return MouseState::MessageBarButton;
        } else if self.message_at_cursor() {
            return MouseState::MessageBar;
        }

        // Check for URL at mouse cursor
        let selection =
            !self.ctx.terminal().selection().as_ref().map(Selection::is_empty).unwrap_or(true);
        let mouse_mode = self.ctx.terminal().mode().intersects(TermMode::MOUSE_MODE);
        let highlighted_url =
            self.urls.highlighted(self.ctx.config(), self.ctx.mouse(), mods, mouse_mode, selection);

        if let Some(url) = highlighted_url {
            return MouseState::Url(url);
        }

        // Check mouse mode if location is not special
        if self.ctx.terminal().mode().intersects(TermMode::MOUSE_MODE)
            && !self.ctx.modifiers().shift
        {
            MouseState::Mouse
        } else {
            MouseState::Text
        }
    }
/// Location of the mouse cursor.
Location of the mouse cursor.
Location of the mouse cursor .
fn mouse_state(&mut self, mods: ModifiersState) -> MouseState {
        // Check message bar before URL to ignore URLs in the message bar
        if self.message_close_at_cursor() {
            return MouseState::MessageBarButton;
        } else if self.message_at_cursor() {
            return MouseState::MessageBar;
        }
        // Check for URL at mouse cursor
        let selection =
            !self.ctx.terminal().selection().as_ref().map(Selection::is_empty).unwrap_or(true);
        let mouse_mode = self.ctx.terminal().mode().intersects(TermMode::MOUSE_MODE);
        let highlighted_url =
            self.urls.highlighted(self.ctx.config(), self.ctx.mouse(), mods, mouse_mode, selection);
        if let Some(url) = highlighted_url {
            return MouseState::Url(url);
        }
        // Check mouse mode if location is not special
        if self.ctx.terminal().mode().intersects(TermMode::MOUSE_MODE)
            && !self.ctx.modifiers().shift
        {
            MouseState::Mouse
        } else {
            MouseState::Text
        }
    }
fn mouse_state ( & mut self , mods : ModifiersState ) -> MouseState { // Check message bar before URL to ignore URLs in the message bar if self . message_close_at_cursor ( ) { return MouseState :: MessageBarButton ; } else if self . message_at_cursor ( ) { return MouseState :: MessageBar ; } // Check for URL at mouse cursor let selection = ! self . ctx . terminal ( ) . selection ( ) . as_ref ( ) . map ( Selection :: is_empty ) . unwrap_or ( true ) ; let mouse_mode = self . ctx . terminal ( ) . mode ( ) . intersects ( TermMode :: MOUSE_MODE ) ; let highlighted_url = self . urls . highlighted ( self . ctx . config ( ) , self . ctx . mouse ( ) , mods , mouse_mode , selection ) ; if let Some ( url ) = highlighted_url { return MouseState :: Url ( url ) ; } // Check mouse mode if location is not special if self . ctx . terminal ( ) . mode ( ) . intersects ( TermMode :: MOUSE_MODE ) && ! self . ctx . modifiers ( ) . shift { MouseState :: Mouse } else { MouseState :: Text } }
Location of the mouse cursor.
Location of the mouse cursor .
&mut self
mods
ModifiersState
&mut self
mods
ModifiersState