diff options
| author | Maxime Coste <mawww@kakoune.org> | 2022-12-15 13:29:45 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2022-12-15 13:29:45 +1100 |
| commit | 20278ed52b175de20b57090f3087a23060a39e24 (patch) | |
| tree | 11e6b67f3794d6c2845cc7b9044c9594ac4e68f9 /src/buffer.cc | |
| parent | 8279a3776f38c875ef58da7823f56fb5ef3407bb (diff) | |
Support adding ByteCount to void/char pointers without casting
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index 4d7d432d..fd8e0c4c 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -604,7 +604,7 @@ BufferCoord Buffer::char_prev(BufferCoord coord) const return { coord.line - 1, m_lines[coord.line - 1].length() - 1 }; auto line = m_lines[coord.line]; - auto column = (int)(utf8::character_start(line.begin() + (int)coord.column - 1, line.begin()) - line.begin()); + auto column = (int)(utf8::character_start(line.begin() + coord.column - 1, line.begin()) - line.begin()); return { coord.line, column }; } |
