Commit Graph

148 Commits

Author SHA1 Message Date
Nicholas Marriott
5039be657c utf8proc bits for utf8_fromwc. 2024-07-12 14:30:56 +01:00
Thomas Adam
d02254f754 Merge branch 'obsd-master' 2024-07-12 14:01:09 +01:00
nicm
aa1353947e UTF-8 keys now contain the internal representation and not the Unicode
codepoint, so convert extended keys properly. From Stanislav Kljuhhin.
2024-07-12 11:21:18 +00:00
Thomas Adam
c07e856d24 Merge branch 'obsd-master' 2024-05-24 16:01:08 +01:00
nicm
692ce59bce Do not escape $ unless DQ is set, that is the only case where we need to
escape it.
2024-05-24 12:41:24 +00:00
Nicholas Marriott
51b80b985e Restore utf8proc code. 2023-09-19 09:29:04 +01:00
Thomas Adam
b202a2f1b5 Merge branch 'obsd-master' 2023-09-17 21:03:06 +01:00
nicm
f09cde2542 Change UTF-8 combining to inspect the previous character at the cursor
position rather than keeping the last character from the input stream,
this is how most terminals work and fixes problems with displaying these
characters in vim. GitHub issue 3600.
2023-09-15 15:49:05 +00:00
Nicholas Marriott
3aa20f6e75 Use %05X not %08X. 2023-09-01 19:37:27 +01:00
Thomas Adam
1aec420465 Merge branch 'obsd-master' 2023-09-01 17:06:27 +01:00
nicm
9456258ccc Rewrite combined character handling to be more consistent and to support
newer Unicode combined characters (which we have to "know" are combined
since they are not width zero). GitHub issue 3600.
2023-09-01 14:29:11 +00:00
Thomas Adam
659d876cd5 Merge branch 'obsd-master' 2023-07-03 12:01:09 +01:00
nicm
e79fb214f8 Another warning fix for GCC from Thomas Klausner. 2023-07-03 08:37:14 +00:00
Thomas Adam
9cf58d1a52 Merge branch 'obsd-master' 2023-07-01 02:01:10 +01:00
nicm
a2a02fd7d7 Change a few types to fix warnings, from Thomas Klausner. 2023-06-30 21:55:08 +00:00
Thomas Adam
153ae758c9 portable: fixup merge with utf8.c 2023-01-08 23:27:54 +00:00
Thomas Adam
5086377f30 Merge branch 'obsd-master' 2023-01-08 23:26:09 +00:00
Nicholas Marriott
2a32565e0c Restore code to handle wcwidth failure so that unknown codepoints still
do the most likely right thing. GitHub issue 3427, patch based on an
diff from Jesse Luehrs in GitHub issue 3003.
2023-01-08 22:15:38 +00:00
nicm
7ced0a03d2 Restore code to handle wcwidth failure so that unknown codepoints still
do the most likely right thing. GitHub issue 3427, patch based on an
diff from Jesse Luehrs in GitHub issue 3003.
2023-01-08 22:15:30 +00:00
Nicholas Marriott
093fb53773 Missing #endif. 2023-01-06 11:38:41 +00:00
Thomas Adam
21e00e4635 Merge branch 'obsd-master' 2023-01-06 09:02:00 +00:00
nicm
8bd17bff49 Make U+FE0F VARIATION SELECTOR-16 change the width from 1 to 2. GitHub
issue 3409.
2022-12-16 08:19:58 +00:00
Nicholas Marriott
ef676e1202 Remove fallback for wcwidth failure, GitHub issue 3003. 2021-12-06 10:17:34 +00:00
nicm
77b1290698 More accurate vi(1) word navigation in copy mode and on the status line.
This changes the meaning of the word-separators option - setting it to
the empty string is equivalent to the previous behavior. From Will Noble
in GitHub issue 2693.
2021-06-10 07:56:47 +00:00
Nicholas Marriott
022d0210c5 More accurate vi(1) word navigation in copy mode and on the status line. This
changes the meaning of the word-separators option - setting it to the empty
string is equivalent to the previous behavior. From Will Noble in GitHub issue
2693.
2021-05-13 08:49:58 +01:00
Nicholas Marriott
679b2288e8 Restore utf8proc bits that went missing, GitHub issue 2564. 2021-02-10 17:18:37 +00:00
Nicholas Marriott
cf8ef63c4a Fix some warnings, GitHub issue 2382. 2020-09-30 13:35:51 +01:00
nicm
869c0e860f Fix some warnings, GitHub issue 2382. 2020-09-16 18:37:55 +00:00
Thomas Adam
90de0c1a9b Merge branch 'obsd-master' 2020-07-21 08:01:19 +01:00
nicm
743ab5728d Fix show-buffer when run from inside tmux, GitHub issue 2314. 2020-07-21 05:24:33 +00:00
Thomas Adam
208d9449b7 Merge branch 'obsd-master' 2020-06-09 12:01:18 +01:00
nicm
fee585ea14 Include width in error message. 2020-06-09 10:37:00 +00:00
Thomas Adam
30eaf885c4 Merge branch 'obsd-master' 2020-06-09 10:01:17 +01:00
nicm
c60389acbf It is not sensible to store pointers into an array we are going to
realloc (duh), use two trees instead.
2020-06-09 08:34:33 +00:00
Thomas Adam
9ffdcc7656 Merge branch 'obsd-master' 2020-06-06 14:01:17 +01:00
nicm
a4a3d89598 Use bitshifts instead of a union for encoding UTF-8 into 32 bits, which
is more friendly to GCC3.

Reported by and ok aoyama@.
2020-06-06 12:38:32 +00:00
Thomas Adam
3d5decb305 Merge branch 'obsd-master' 2020-06-02 22:01:20 +01:00
nicm
2a4d4bda2b Allow UTF-8 characters of width 0 to be stored, it is useful to be able
to put padding cells in as width 0.
2020-06-02 20:10:23 +00:00
Thomas Adam
ebe866c378 Merge branch 'obsd-master' 2020-06-02 20:01:18 +01:00
nicm
7e501f1993 UTF-8 keys need to be big endian so the size bits are at the top. 2020-06-02 17:17:44 +00:00
Thomas Adam
049ccb4a4b Merge branch 'obsd-master' 2020-06-02 14:01:17 +01:00
nicm
822ee4e0a6 Fail rather than fatal on UTF-8 width 0. 2020-06-02 11:29:00 +00:00
Thomas Adam
fd8652ceda Merge branch 'obsd-master' 2020-05-26 16:01:19 +01:00
nicm
ff6f2ff6d9 Return new character properly when converting to data. 2020-05-26 12:50:03 +00:00
Nicholas Marriott
bc2e0cf7ff Remove bad merge. 2020-05-26 08:54:05 +01:00
Nicholas Marriott
d73fcfc176 Put the fix back for wcwidth() failing. 2020-05-26 08:49:36 +01:00
Thomas Adam
967e5f8be3 Merge branch 'obsd-master' 2020-05-26 08:42:55 +01:00
nicm
6f03e49e68 Use the internal representation for UTF-8 keys instead of wchar_t and
drop some code only needed for that.
2020-05-25 18:57:24 +00:00
nicm
49ec074271 Tidy up new UTF-8 code and make it more generic. 2020-05-25 18:19:29 +00:00
Thomas Adam
b34af611a5 Merge branch 'obsd-master' 2020-05-25 18:01:20 +01:00