diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..4ef1387 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,11 @@ +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details +version: 2 +build: + os: ubuntu-22.04 + tools: + python: "3.11" +sphinx: + configuration: docs/conf.py +python: + install: + - requirements: docs/requirements.txt diff --git a/bin/wcwidth-browser.py b/bin/wcwidth-browser.py index fb6ac19..51bcc21 100755 --- a/bin/wcwidth-browser.py +++ b/bin/wcwidth-browser.py @@ -54,8 +54,8 @@ def readline(term, width): inp = term.inkey() if inp.code == term.KEY_ENTER: break - if inp.code == term.KEY_ESCAPE or inp == chr(3): - text = None + if inp.code == term.KEY_ESCAPE: + text = '' break if not inp.is_sequence and len(text) < width: text += inp @@ -478,7 +478,7 @@ def _process_keystroke_commands(self, inp): # library performs best-match (with warnings) self.unicode_version = _wcmatch_version(inp) self.initialize_page_data() - self.on_resize(None, None) + self.on_resize(None, None) def _process_keystroke_movement(self, inp, idx, offset): """Process keystrokes that adjust index and offset.""" diff --git a/docs/intro.rst b/docs/intro.rst index 487b681..f686a6b 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -217,7 +217,7 @@ Other Languages History ======= -Unreleased *2023-?-?* +0.2.7 *2023-09-28* * **Updated** tables to include Unicode Specification 15.1.0. 0.2.6 *2023-01-14* diff --git a/setup.py b/setup.py index ec302f4..fdfd00c 100755 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ def main(): setuptools.setup( name='wcwidth', # NOTE: manually manage __version__ in wcwidth/__init__.py ! - version='0.2.6', + version='0.2.7', description=( "Measures the displayed width of unicode strings in a terminal"), long_description=codecs.open( diff --git a/wcwidth/__init__.py b/wcwidth/__init__.py index ec554c3..437e8d4 100644 --- a/wcwidth/__init__.py +++ b/wcwidth/__init__.py @@ -25,4 +25,4 @@ # We also used pkg_resources to load unicode version tables from version.json, # generated by bin/update-tables.py, but some environments are unable to # import pkg_resources for one reason or another, yikes! -__version__ = '0.2.6' +__version__ = '0.2.7' diff --git a/wcwidth/wcwidth.py b/wcwidth/wcwidth.py index 82a86ee..f83e410 100644 --- a/wcwidth/wcwidth.py +++ b/wcwidth/wcwidth.py @@ -218,7 +218,7 @@ def wcwidth(wc, unicode_version='auto'): if _bisearch(ucs, ZERO_WIDTH[_unicode_version]): return 0 - # "Wide AastAsian" (and emojis) + # "Wide EastAsian" (and emojis) return 1 + _bisearch(ucs, WIDE_EASTASIAN[_unicode_version])