Skip to content

Commit 78fa77b

Browse files
committed
fix
1 parent e74d155 commit 78fa77b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

crates/egui-term/src/alacritty/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ impl<'a> TerminalContext<'a> {
353353
pub fn write_data<I: Into<Cow<'static, [u8]>>>(&mut self, data: I) {
354354
self.write(data);
355355
self.terminal.scroll_display(Scroll::Bottom);
356+
self.terminal.selection = None;
356357
}
357358

358359
fn process_link(&mut self, link_action: LinkAction, point: Point) {

crates/egui-term/src/view.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,15 @@ impl<'a> TerminalView<'a> {
256256
modifiers,
257257
pos,
258258
} => {
259-
let new_pos = if is_in_terminal(pos, layout.rect) {
260-
pos
261-
} else {
259+
let out_of = !is_in_terminal(pos, layout.rect);
260+
if out_of && pressed {
261+
continue;
262+
}
263+
264+
let new_pos = if out_of {
262265
pos.clamp(layout.rect.min, layout.rect.max)
266+
} else {
267+
pos
263268
};
264269

265270
if let Some(action) =

0 commit comments

Comments
 (0)