Skip to content

Commit

Permalink
Fix message wrapping offset introduced by PR #239.
Browse files Browse the repository at this point in the history
  • Loading branch information
andymandias authored and casperstorm committed Mar 1, 2024
1 parent d9ea463 commit 547e2c9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
16 changes: 12 additions & 4 deletions src/buffer/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,20 @@ pub fn view<'a>(
}
_ => theme::Container::Default,
};
let message = selectable_text(format!(" {}", message.text));

let space = selectable_text(" ");
let message = selectable_text(&message.text);

Some(
container(row![].push_maybe(timestamp).push(nick).push(message))
.style(row_style)
.into(),
container(
row![]
.push_maybe(timestamp)
.push(nick)
.push(space)
.push(message),
)
.style(row_style)
.into(),
)
}
message::Source::Server(_) => {
Expand Down
12 changes: 10 additions & 2 deletions src/buffer/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,18 @@ pub fn view<'a>(
)
.map(scroll_view::Message::UserContext);

let message = selectable_text(format!(" {}", message.text));
let space = selectable_text(" ");
let message = selectable_text(&message.text);

Some(
container(row![].push_maybe(timestamp).push(nick).push(message)).into(),
container(
row![]
.push_maybe(timestamp)
.push(nick)
.push(space)
.push(message),
)
.into(),
)
}
message::Source::Server(_) => {
Expand Down

0 comments on commit 547e2c9

Please sign in to comment.