This commit is contained in:
Antonio Scandurra 2021-05-07 14:38:21 +02:00
parent 4797ccfdcd
commit 5f1d0b8850

View file

@ -75,7 +75,7 @@ impl Selection {
pub fn buffer_rows_for_display_rows(
&self,
expand_if_ends_at_line_start: bool,
include_end_if_at_line_start: bool,
map: &DisplayMap,
ctx: &AppContext,
) -> (Range<u32>, Range<u32>) {
@ -85,7 +85,7 @@ impl Selection {
.unwrap();
let mut display_end = self.end.to_display_point(map, ctx).unwrap();
if !expand_if_ends_at_line_start
if !include_end_if_at_line_start
&& display_end.row() != map.max_point(ctx).row()
&& display_start.row() != display_end.row()
&& display_end.column() == 0