Fixed bug where hyperlinks would not be refreshed when the page scrolled
This commit is contained in:
parent
550ae40ff5
commit
a8e05c946e
2 changed files with 61 additions and 82 deletions
|
@ -15,9 +15,9 @@ use gpui::{
|
|||
},
|
||||
serde_json::json,
|
||||
text_layout::{Line, RunStyle},
|
||||
Element, ElementBox, Event, EventContext, FontCache, KeyDownEvent, ModelContext,
|
||||
ModifiersChangedEvent, MouseButton, MouseRegion, PaintContext, Quad, SizeConstraint,
|
||||
TextLayoutCache, WeakModelHandle, WeakViewHandle,
|
||||
Element, ElementBox, Event, EventContext, FontCache, KeyDownEvent, ModelContext, MouseButton,
|
||||
MouseRegion, PaintContext, Quad, SizeConstraint, TextLayoutCache, WeakModelHandle,
|
||||
WeakViewHandle,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use ordered_float::OrderedFloat;
|
||||
|
@ -844,18 +844,6 @@ impl Element for TerminalElement {
|
|||
})
|
||||
})
|
||||
.unwrap_or(false)
|
||||
} else if let Event::ModifiersChanged(ModifiersChangedEvent { cmd, .. }) = event {
|
||||
self.terminal
|
||||
.upgrade(cx.app)
|
||||
.map(|model_handle| {
|
||||
if model_handle.update(cx.app, |term, _| term.refresh_hyperlink(*cmd)) {
|
||||
cx.notify();
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
})
|
||||
.unwrap_or(false)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue