Allow inserting non-BMP characters
authorPhilipp Stephani <phst@google.com>
Mon, 25 Dec 2017 21:00:00 +0000 (22:00 +0100)
committerAlan Third <alan@idiocy.org>
Sun, 17 Jun 2018 10:50:58 +0000 (11:50 +0100)
commit0deab3fbd8a51fc83ab7c8031f4e296a4003b055
treec6df46e597238d00b5cee8157e4f76be36d9999d
parentebe065fddf76fde64a9c07b419b67fe47fb6c1cb
Allow inserting non-BMP characters

* src/coding.h (UTF_16_HIGH_SURROGATE_P, UTF_16_LOW_SURROGATE_P): Move
from coding.c and document.
(surrogates_to_codepoint): New function.

* src/nsterm.m (insertText:): Properly handle surrogate pairs.

(cherry picked from commit 703ac3ea1c1ce381f385469a0e88bc29d3fe83c2)
src/coding.c
src/coding.h
src/nsterm.m