aboutsummaryrefslogtreecommitdiff
path: root/utf8.c
Commit message (Collapse)AuthorAge
* More accurate vi(1) word navigation in copy mode and on the status line.nicm2021-06-10
| | | | | | 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.
* Fix some warnings, GitHub issue 2382.nicm2020-09-16
|
* Fix show-buffer when run from inside tmux, GitHub issue 2314.nicm2020-07-21
|
* Include width in error message.nicm2020-06-09
|
* It is not sensible to store pointers into an array we are going tonicm2020-06-09
| | | | realloc (duh), use two trees instead.
* Use bitshifts instead of a union for encoding UTF-8 into 32 bits, whichnicm2020-06-06
| | | | | | is more friendly to GCC3. Reported by and ok aoyama@.
* Allow UTF-8 characters of width 0 to be stored, it is useful to be ablenicm2020-06-02
| | | | to put padding cells in as width 0.
* UTF-8 keys need to be big endian so the size bits are at the top.nicm2020-06-02
|
* Fail rather than fatal on UTF-8 width 0.nicm2020-06-02
|
* Return new character properly when converting to data.nicm2020-05-26
|
* Use the internal representation for UTF-8 keys instead of wchar_t andnicm2020-05-25
| | | | drop some code only needed for that.
* Tidy up new UTF-8 code and make it more generic.nicm2020-05-25
|
* Make some data types consistent.nicm2020-05-25
|
* Instead of storing all UTF-8 characters in the extended cell which meansnicm2020-05-25
| | | | | | | that 14 bytes are wasted for each character in the BMP, only store characters of three bytes or less in the cell itself and store others (outside the BMP or with combining characters) in a separate global tree. Can reduce grid memory use for heavy Unicode users by around 30%.
* Add p format modifier for padding to width.nicm2019-11-25
|
* Add formats for word and line under the mouse and use them to add somenicm2019-05-26
| | | | items to the pane menu.
* Environment variables can start with { also.nicm2019-05-23
|
* Break the argument escaping code into a separate function and use it tonicm2019-05-23
| | | | escape key bindings in list-keys. Also escape ~ and ; and $ properly.
* Extend the #[] style syntax and use that together with previous formatnicm2019-03-18
| | | | | | | | | | | | | | | | | | | | changes to allow the status line to be entirely configured with a single option. Now that it is possible to configure their content, enable the existing code that lets the status line be multiple lines in height. The status option can now take a value of 2, 3, 4 or 5 (as well as the previous on or off) to configure more than one line. The new status-format array option configures the format of each line, the default just references the existing status-* options, although some of the more obscure status options may be eliminated in time. Additions to the #[] syntax are: "align" to specify alignment (left, centre, right), "list" for the window list and "range" to configure ranges of text for the mouse bindings. The "align" keyword can also be used to specify alignment of entries in tree mode and the pane status lines.
* Remove unused variable.nicm2017-06-04
|
* Be more strict about escape sequences that rename windows or set titles:nicm2017-06-04
| | | | | ignore any that not valid UTF-8 outright, and for good measure pass the result through our UTF-8-aware vis(3).
* Style and spacing nits.nicm2017-05-31
|
* Fix a couple of argument types.nicm2017-03-17
|
* Plain stravis() because it will mangle UTF-8 characters, so addnicm2017-01-18
| | | | utf8_stravis() which calls our existing utf8_strvis() and use it instead
* Support UTF-8 entry into the command prompt.nicm2016-10-11
|
* Most of the utf8_data is fixed so simplify utf8_set to use a memcpy.nicm2016-05-27
|
* OpenBSD wcwidth() is sensible and complete so if it returns -1 it meansnicm2016-04-29
| | | | | that a character is not printable, so return to ignoring such characters.
* Loads of platforms appear to have old or broken Unicode character typenicm2016-04-27
| | | | | | information and are missing widths for relatively common Unicode characters (so mbtowc() works, but wcwidth() fails). So if wcwidth() returns -1, assume a width of 1 instead of ignoring the character.
* Log wcwidth() and mbtowc() failure to make it easier to debug a Unicodenicm2016-04-26
| | | | codepoint not appearing.
* Handle wcwidth() and mbtowc() failures in better style and dropnicm2016-03-02
| | | | | characters where we can't find the width (wcwidth() fails) on input, the same as we drop invalid UTF-8. Suggested by schwarze@.
* Use system wcwidth() instead of carrying around UTF-8 width tables.nicm2016-03-01
|
* Whoops, need this for the previous reverse trim commit too.nicm2016-01-31
|
* I no longer use my SourceForge address so replace it.nicm2016-01-19
|
* Memory leaks and an uninitialized part of utf8_data, from Patrick Palka.nicm2015-11-20
|
* The private use area at U+E000 to U+F8FF is not very useful if it isnicm2015-11-14
| | | | width 0, make it width 1 instead.
* All these return values from utf8_* are confusing, use an enum.nicm2015-11-14
|
* Rename a variable in utf8_combine for consistency and use 0xfffd fornicm2015-11-14
| | | | unknown Unicode.
* Be more strict about invalid UTF-8.nicm2015-11-14
|
* Long overdue change to the way we store cells in the grid: now, insteadnicm2015-11-13
| | | | | | | | | | | | | | | of storing a full grid_cell with UTF-8 data and everything, store a new type grid_cell_entry. This can either be the cell itself (for ASCII cells), or an offset into an extended array (per line) for UTF-8 data. This avoid a large (8 byte) overhead on non-UTF-8 cells (by far the majority for most users) without the complexity of the shadow array we had before. Grid memory without any UTF-8 is about half. The disadvantage that cells can no longer be modified in place and need to be copied out of the grid and back but it turned out to be lot less complicated than I expected.
* Rename overly-long utf8data to ud throughout.nicm2015-11-12
|
* Add utf8_padcstr and use it to align columns in list-keys.nicm2015-11-12
|
* Tidy utf8.c a little: build table on first use, and make utf8_width takenicm2015-11-12
| | | | a u_int rather than splitting and then combining again in utf8_split.
* If we know the terminal outside tmux is not UTF-8, replace UTF-8 innicm2015-11-12
| | | | | error messages and whatnot with underscores the same as we do when we draw UTF-8 characters as part of the screen.
* Support UTF-8 key bindings by expanding the key type from int tonicm2015-11-12
| | | | | | uint64_t and converting UTF-8 to Unicode on input and the reverse on output. (This allows key bindings, there are still omissions - the largest being that the various prompts do not accept UTF-8.)
* Update the internal wcwidth(3) table of tmux(1) to match the dataschwarze2015-11-05
| | | | | | | | | in /usr/src/share/locale/ctype/en_US.UTF-8.src, with one single exception: Keep U+00AD SOFT HYPHEN at width 1 rather than moving it to width 0, a tradition already observed in the old https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c . While here, manually rebalance the btree for optimal lookup speed. OK nicm@
* Style nit - unnecessary brackets.nicm2015-04-20
|
* Add xreallocarray and remove nmemb argument from xrealloc.nicm2014-10-08
|
* Add some UTF-8 utility functions and use them to prevent the width limitnicm2014-04-17
| | | | on formats from splitting UTF-8 characters improperly.
* Some more long lines.nicm2014-04-17
|
* Support UTF-8 with choose-buffer, from Kosuke ASAMI. Also makenicm2014-04-02
| | | | buffer_sample bigger to let it trim at window right edge.