Skip to content

Commit a7516ca

Browse files
Merge pull request #1609 from contour-terminal/fix/vi-mode-big-moves
Fix vi-modifier `viW` / `oiW` / `yiW` as well as `B` and `W` (white space delimited motions)
2 parents 228a95d + f13fc00 commit a7516ca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

metainfo.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@
107107
<release version="0.5.1" urgency="medium" type="development">
108108
<description>
109109
<ul>
110-
<li>Port to C++20's `std::format()` (#1598)</li>
110+
<li>Fixes vi-mode motions like `viW`, `yiW`, `oiW` as well as `B` and `W`</li>
111111
<li>Enable support for Unicode version 16.0.0 (#1606)</li>
112+
<li>Port to C++20's `std::format()` (#1598)</li>
112113
<li>Drop support for Ubuntu 23.10 and older. In order to have less burdain of maintencne, we only support the latest LTS of Ubuntu, which currently is 24.04 (#1607)</li>
113114
<li>Fix rendered backend loading from config</li>
114115
</ul>

src/vtbackend/Line.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ class Line
215215
return unbox<size_t>(column) >= trivialBuffer().text.size()
216216
|| trivialBuffer().text[column.as<size_t>()] == 0x20;
217217
}
218-
return inflatedBuffer().at(unbox<size_t>(column)).empty();
218+
auto const& cell = inflatedBuffer().at(unbox<size_t>(column));
219+
return cell.empty() || (cell.codepointCount() == 1 && cell.codepoint(0) == 0x20);
219220
}
220221

221222
[[nodiscard]] uint8_t cellWidthAt(ColumnOffset column) const noexcept

0 commit comments

Comments
 (0)