Improve selection inside ligatures
This commit is contained in:
parent
4107165128
commit
ab56c52c73
2 changed files with 4 additions and 3 deletions
|
|
@ -14,6 +14,7 @@ sys-locale = "0.2"
|
|||
unicode-bidi = "0.3"
|
||||
unicode-linebreak = "0.1"
|
||||
unicode-script = "0.5"
|
||||
unicode-segmentation = "1.7"
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ impl<'a> TextBuffer<'a> {
|
|||
if line_i == start.line.get() && line_i == end.line.get() {
|
||||
// On edge of start and end line, check if any contained glyphs are after start and before end
|
||||
for glyph in layout_line.glyphs.iter() {
|
||||
if glyph.start >= start.index && glyph.end <= end.index {
|
||||
if glyph.end > start.index && glyph.start < end.index {
|
||||
inside = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -908,7 +908,7 @@ impl<'a> TextBuffer<'a> {
|
|||
} else if line_i == start.line.get() {
|
||||
// On edge of start line, check if any contained glyphs are after start
|
||||
for glyph in layout_line.glyphs.iter() {
|
||||
if glyph.start >= start.index {
|
||||
if glyph.end > start.index {
|
||||
inside = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -916,7 +916,7 @@ impl<'a> TextBuffer<'a> {
|
|||
} else if line_i == end.line.get() {
|
||||
// On edge of end line, check if any contained glyphs are before end
|
||||
for glyph in layout_line.glyphs.iter() {
|
||||
if glyph.end <= end.index {
|
||||
if glyph.start < end.index {
|
||||
inside = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue