mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 21:32:13 +03:00
fix panic when double-click-selection drags across line boundary
closes: https://github.com/wez/wezterm/issues/762
This commit is contained in:
parent
55289013ed
commit
b8acdf592f
@ -15,6 +15,7 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
* x11: support for [VoidSymbol](config/keys.md#voidsymbol) in key assignments. Thanks to [@digitallyserviced](https://github.com/digitallyserviced)! [#759](https://github.com/wez/wezterm/pull/759)
|
||||
* Fixed: UTF8-encoded-C1 control codes were not always recognized as control codes, and could result in a panic when later attempting to update the line. [#768](https://github.com/wez/wezterm/issues/768)
|
||||
* Fixed: `wezterm cli split-pane` didn't use the current working dir of the source pane. [#766](https://github.com/wez/wezterm/issues/766)
|
||||
* Fixed: double-click-drag selection could panic when crossing line boundaries [#762](https://github.com/wez/wezterm/issues/762)
|
||||
|
||||
### 20210502-154244-3f7122cb
|
||||
|
||||
|
@ -144,7 +144,8 @@ impl SelectionRange {
|
||||
.logical
|
||||
.compute_double_click_range(start_idx, is_double_click_word)
|
||||
{
|
||||
DoubleClickRange::Range(click_range) => {
|
||||
DoubleClickRange::RangeWithWrap(click_range)
|
||||
| DoubleClickRange::Range(click_range) => {
|
||||
let (start_y, start_x) = logical.logical_x_to_physical_coord(click_range.start);
|
||||
let (end_y, end_x) = logical.logical_x_to_physical_coord(click_range.end - 1);
|
||||
Self {
|
||||
@ -155,11 +156,6 @@ impl SelectionRange {
|
||||
end: SelectionCoordinate { x: end_x, y: end_y },
|
||||
}
|
||||
}
|
||||
DoubleClickRange::RangeWithWrap(_) => {
|
||||
// We're using logical lines to match against, so we should never get
|
||||
// a RangeWithWrap result here
|
||||
unreachable!()
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user