Mercurial > vim
comparison src/mbyte.c @ 21996:808edde1e97d v8.2.1547
patch 8.2.1547: various comment problems
Commit: https://github.com/vim/vim/commit/02c037a4be6aeb7f6376e7dcc3ab41cfc6db3ede
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 30 19:26:45 2020 +0200
patch 8.2.1547: various comment problems
Problem: Various comment problems.
Solution: Update comments.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 30 Aug 2020 19:30:13 +0200 |
parents | 2030f8267db9 |
children | 5f08d4a42898 |
comparison
equal
deleted
inserted
replaced
21995:df20e24140b4 | 21996:808edde1e97d |
---|---|
1605 utf_ptr2cells( | 1605 utf_ptr2cells( |
1606 char_u *p) | 1606 char_u *p) |
1607 { | 1607 { |
1608 int c; | 1608 int c; |
1609 | 1609 |
1610 // Need to convert to a wide character. | 1610 // Need to convert to a character number. |
1611 if (*p >= 0x80) | 1611 if (*p >= 0x80) |
1612 { | 1612 { |
1613 c = utf_ptr2char(p); | 1613 c = utf_ptr2char(p); |
1614 // An illegal byte is displayed as <xx>. | 1614 // An illegal byte is displayed as <xx>. |
1615 if (utf_ptr2len(p) == 1 || c == NUL) | 1615 if (utf_ptr2len(p) == 1 || c == NUL) |
1760 return (p[0] << 8) + p[1]; | 1760 return (p[0] << 8) + p[1]; |
1761 return *p; | 1761 return *p; |
1762 } | 1762 } |
1763 | 1763 |
1764 /* | 1764 /* |
1765 * Convert a UTF-8 byte sequence to a wide character. | 1765 * Convert a UTF-8 byte sequence to a character number. |
1766 * If the sequence is illegal or truncated by a NUL the first byte is | 1766 * If the sequence is illegal or truncated by a NUL the first byte is |
1767 * returned. | 1767 * returned. |
1768 * For an overlong sequence this may return zero. | 1768 * For an overlong sequence this may return zero. |
1769 * Does not include composing characters, of course. | 1769 * Does not include composing characters, of course. |
1770 */ | 1770 */ |