diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs index e6f7597f2..5753c4d27 100644 --- a/Terminal.Gui/Views/TextView.cs +++ b/Terminal.Gui/Views/TextView.cs @@ -308,7 +308,7 @@ namespace Terminal.Gui { col++; } break; - } else if (end < t.Count && col > 0 && start < end && col == start) { + } else if ((end < t.Count && col > 0 && start < end && col == start) || (end - col == width - 1)) { break; } col = i; diff --git a/UnitTests/TextViewTests.cs b/UnitTests/TextViewTests.cs index fa29e5d85..8852d0b70 100644 --- a/UnitTests/TextViewTests.cs +++ b/UnitTests/TextViewTests.cs @@ -1814,7 +1814,7 @@ namespace Terminal.Gui.Views { col++; } break; - } else if (cCol < line.Length && col > 0 && start < cCol && col == start) { + } else if ((cCol < line.Length && col > 0 && start < cCol && col == start) || (cCol - col == width - 1)) { break; } col = i;