Commit e21e74f813
Unsigned
Layout: unified · split
Cargo.lock +7 −7
| @@ -1058,7 +1058,7 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" | ||
| 1058 | 1058 | [[package]] |
| 1059 | 1059 | name = "matrix-sdk" |
| 1060 | 1060 | version = "0.2.0" |
| 1061 | source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#cf07fc8e8e44c0857f8230813950f487297127d2" | |
| 1061 | source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#c034de470b02fa9659f0d65c25579739b702e377" | |
| 1062 | 1062 | dependencies = [ |
| 1063 | 1063 | "dashmap", |
| 1064 | 1064 | "futures", |
| @@ -1080,7 +1080,7 @@ dependencies = [ | ||
| 1080 | 1080 | [[package]] |
| 1081 | 1081 | name = "matrix-sdk-base" |
| 1082 | 1082 | version = "0.2.0" |
| 1083 | source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#cf07fc8e8e44c0857f8230813950f487297127d2" | |
| 1083 | source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#c034de470b02fa9659f0d65c25579739b702e377" | |
| 1084 | 1084 | dependencies = [ |
| 1085 | 1085 | "chacha20poly1305", |
| 1086 | 1086 | "dashmap", |
| @@ -1103,7 +1103,7 @@ dependencies = [ | ||
| 1103 | 1103 | [[package]] |
| 1104 | 1104 | name = "matrix-sdk-common" |
| 1105 | 1105 | version = "0.2.0" |
| 1106 | source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#cf07fc8e8e44c0857f8230813950f487297127d2" | |
| 1106 | source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#c034de470b02fa9659f0d65c25579739b702e377" | |
| 1107 | 1107 | dependencies = [ |
| 1108 | 1108 | "async-trait", |
| 1109 | 1109 | "futures-locks", |
| @@ -1117,7 +1117,7 @@ dependencies = [ | ||
| 1117 | 1117 | [[package]] |
| 1118 | 1118 | name = "matrix-sdk-crypto" |
| 1119 | 1119 | version = "0.2.0" |
| 1120 | source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#cf07fc8e8e44c0857f8230813950f487297127d2" | |
| 1120 | source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#c034de470b02fa9659f0d65c25579739b702e377" | |
| 1121 | 1121 | dependencies = [ |
| 1122 | 1122 | "aes-ctr", |
| 1123 | 1123 | "aes-gcm", |
| @@ -2771,7 +2771,7 @@ dependencies = [ | ||
| 2771 | 2771 | [[package]] |
| 2772 | 2772 | name = "weechat" |
| 2773 | 2773 | version = "0.4.0" |
| 2774 | source = "git+https://github.com/poljar/rust-weechat#553e2e15f122d56d0b5e55f58d19c8c3cb1764c3" | |
| 2774 | source = "git+https://github.com/poljar/rust-weechat#2044828e5d094f0413c34ea6f6043800e34cdf57" | |
| 2775 | 2775 | dependencies = [ |
| 2776 | 2776 | "async-task", |
| 2777 | 2777 | "async-trait", |
| @@ -2788,7 +2788,7 @@ dependencies = [ | ||
| 2788 | 2788 | [[package]] |
| 2789 | 2789 | name = "weechat-macro" |
| 2790 | 2790 | version = "0.4.0" |
| 2791 | source = "git+https://github.com/poljar/rust-weechat#553e2e15f122d56d0b5e55f58d19c8c3cb1764c3" | |
| 2791 | source = "git+https://github.com/poljar/rust-weechat#2044828e5d094f0413c34ea6f6043800e34cdf57" | |
| 2792 | 2792 | dependencies = [ |
| 2793 | 2793 | "libc", |
| 2794 | 2794 | "proc-macro2", |
| @@ -2822,7 +2822,7 @@ dependencies = [ | ||
| 2822 | 2822 | [[package]] |
| 2823 | 2823 | name = "weechat-sys" |
| 2824 | 2824 | version = "0.4.0" |
| 2825 | source = "git+https://github.com/poljar/rust-weechat#553e2e15f122d56d0b5e55f58d19c8c3cb1764c3" | |
| 2825 | source = "git+https://github.com/poljar/rust-weechat#2044828e5d094f0413c34ea6f6043800e34cdf57" | |
| 2826 | 2826 | dependencies = [ |
| 2827 | 2827 | "bindgen", |
| 2828 | 2828 | "libc", |
src/room/mod.rs +7 −2
| @@ -276,6 +276,7 @@ impl RoomHandle { | ||
| 276 | 276 | |
| 277 | 277 | buffer.enable_nicklist(); |
| 278 | 278 | buffer.disable_nicklist_groups(); |
| 279 | buffer.enable_multiline(); | |
| 279 | 280 | |
| 280 | 281 | buffer.set_localvar("server", server_name); |
| 281 | 282 | buffer.set_localvar("nick", &own_nick); |
| @@ -849,14 +850,18 @@ impl MatrixRoom { | ||
| 849 | 850 | |
| 850 | 851 | let mut lines = buffer.lines(); |
| 851 | 852 | let mut first_line = lines.rfind(line_contains_uuid); |
| 852 | let mut line_num = 0; | |
| 853 | ||
| 854 | // We go in reverse order here since we also use rfind(). We got from | |
| 855 | // the bottom of the buffer to the top since we're expecting these | |
| 856 | // lines to be freshly printed and thus at the bottom. | |
| 857 | let mut line_num = rendered.content.lines.len() - 1; | |
| 853 | 858 | |
| 854 | 859 | while let Some(line) = &first_line { |
| 855 | 860 | let rendered_line = &rendered.content.lines[line_num]; |
| 856 | 861 | |
| 857 | 862 | line.set_message(&rendered_line.message); |
| 858 | 863 | |
| 859 | line_num += 1; | |
| 864 | line_num -= 1; | |
| 860 | 865 | first_line = lines.next_back().filter(line_contains_uuid); |
| 861 | 866 | } |
| 862 | 867 | } |