Fallback to glyph wrapping if word wrapping does not fit

This commit is contained in:
Jeremy Soller 2024-02-02 10:43:20 -07:00
parent 4609fc48df
commit 1403adb1aa
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
2 changed files with 2 additions and 2 deletions

2
Cargo.lock generated
View file

@ -1095,7 +1095,7 @@ dependencies = [
[[package]]
name = "cosmic-text"
version = "0.10.0"
source = "git+https://github.com/pop-os/cosmic-text#1b025ae56e0122cff5798b9f54fc56d47a182d2b"
source = "git+https://github.com/pop-os/cosmic-text#cc75bb66b40794702ebc9fc9e30b1b29d7438bb5"
dependencies = [
"bitflags 2.4.2",
"cosmic_undo_2",

View file

@ -82,7 +82,7 @@ impl EditorTab {
editor.set_tab_width(config.tab_width);
editor.with_buffer_mut(|buffer| {
buffer.set_wrap(if config.word_wrap {
Wrap::Word
Wrap::WordOrGlyph
} else {
Wrap::None
})